接go数据
This commit is contained in:
@ -53,13 +53,13 @@ spring:
|
|||||||
username: xinnengyuandev
|
username: xinnengyuandev
|
||||||
password: StRWCZdZirysNSs2
|
password: StRWCZdZirysNSs2
|
||||||
# 从库数据源
|
# 从库数据源
|
||||||
# slave:
|
slave:
|
||||||
# lazy: true
|
lazy: true
|
||||||
# type: ${spring.datasource.type}
|
type: ${spring.datasource.type}
|
||||||
# driverClassName: com.mysql.cj.jdbc.Driver
|
driverClassName: com.mysql.cj.jdbc.Driver
|
||||||
# url: jdbc:mysql://192.168.110.2:13386/zmkgdev?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true
|
url: jdbc:mysql://192.168.110.2:13386/zmkgdev?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true
|
||||||
# username: zmkgdev
|
username: zmkgdev
|
||||||
# password: JhYxREf25AXdy3h8
|
password: JhYxREf25AXdy3h8
|
||||||
# oracle:
|
# oracle:
|
||||||
# type: ${spring.datasource.type}
|
# type: ${spring.datasource.type}
|
||||||
# driverClassName: oracle.jdbc.OracleDriver
|
# driverClassName: oracle.jdbc.OracleDriver
|
||||||
@ -287,7 +287,7 @@ sparta:
|
|||||||
id-card:
|
id-card:
|
||||||
encrypt-key: 7ae260d150a14027d2238a1cf80a48ef
|
encrypt-key: 7ae260d150a14027d2238a1cf80a48ef
|
||||||
recognizer:
|
recognizer:
|
||||||
url: http://192.168.110.5:50070
|
url: http://192.168.110.5:50071
|
||||||
|
|
||||||
qrCode:
|
qrCode:
|
||||||
url: http://192.168.110.151:7788
|
url: http://192.168.110.151:7788
|
||||||
|
|||||||
@ -273,7 +273,7 @@ weather:
|
|||||||
api-host: n35rk53njv.re.qweatherapi.com
|
api-host: n35rk53njv.re.qweatherapi.com
|
||||||
# dxf转 geojson 执行文件名
|
# dxf转 geojson 执行文件名
|
||||||
dxf2GeoJson:
|
dxf2GeoJson:
|
||||||
file-name: main.exe
|
file-name: main
|
||||||
ys7:
|
ys7:
|
||||||
app-key: 3acf9f1a43dc4209841e0893003db0a2
|
app-key: 3acf9f1a43dc4209841e0893003db0a2
|
||||||
app-secret: 4bbf3e9394f55d3af6e3af27b2d3db36
|
app-secret: 4bbf3e9394f55d3af6e3af27b2d3db36
|
||||||
@ -286,7 +286,7 @@ sparta:
|
|||||||
id-card:
|
id-card:
|
||||||
encrypt-key: 7ae260d150a14027d2238a1cf80a48ef
|
encrypt-key: 7ae260d150a14027d2238a1cf80a48ef
|
||||||
recognizer:
|
recognizer:
|
||||||
url: http://192.168.110.5:50070
|
url: http://192.168.110.5:50071
|
||||||
|
|
||||||
qrCode:
|
qrCode:
|
||||||
url: http://xny.yj-3d.com:7788
|
url: http://xny.yj-3d.com:7788
|
||||||
|
|||||||
@ -1,19 +1,21 @@
|
|||||||
package org.dromara.bigscreen.controller;
|
package org.dromara.bigscreen.controller;
|
||||||
|
|
||||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import cn.hutool.core.collection.CollUtil;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
import jakarta.validation.constraints.NotNull;
|
import jakarta.validation.constraints.NotNull;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.dromara.bigscreen.domain.vo.ProjectImageProgressVo;
|
import org.dromara.bigscreen.domain.*;
|
||||||
import org.dromara.bigscreen.domain.vo.ProjectLandVo;
|
import org.dromara.bigscreen.domain.vo.*;
|
||||||
import org.dromara.bigscreen.domain.vo.ProjectPeopleVo;
|
import org.dromara.bigscreen.mapper.ProjectBigScreenMapper;
|
||||||
import org.dromara.bigscreen.domain.vo.ProjectSafetyInspectionVo;
|
|
||||||
import org.dromara.bigscreen.service.ProjectBigScreenService;
|
import org.dromara.bigscreen.service.ProjectBigScreenService;
|
||||||
import org.dromara.common.core.domain.R;
|
import org.dromara.common.core.domain.R;
|
||||||
|
import org.dromara.common.core.utils.DateUtils;
|
||||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||||
import org.dromara.common.log.annotation.Log;
|
import org.dromara.common.log.annotation.Log;
|
||||||
import org.dromara.common.log.enums.BusinessType;
|
import org.dromara.common.log.enums.BusinessType;
|
||||||
|
import org.dromara.common.utils.BigDecimalUtil;
|
||||||
import org.dromara.gps.domain.bo.GpsEquipmentBo;
|
import org.dromara.gps.domain.bo.GpsEquipmentBo;
|
||||||
import org.dromara.gps.domain.vo.GpsEquipmentSonVo;
|
import org.dromara.gps.domain.vo.GpsEquipmentSonVo;
|
||||||
import org.dromara.gps.service.IGpsEquipmentService;
|
import org.dromara.gps.service.IGpsEquipmentService;
|
||||||
@ -21,15 +23,17 @@ import org.dromara.land.domain.BusLandBlock;
|
|||||||
import org.dromara.land.domain.BusLandTransferLedger;
|
import org.dromara.land.domain.BusLandTransferLedger;
|
||||||
import org.dromara.land.service.IBusLandBlockService;
|
import org.dromara.land.service.IBusLandBlockService;
|
||||||
import org.dromara.land.service.IBusLandTransferLedgerService;
|
import org.dromara.land.service.IBusLandTransferLedgerService;
|
||||||
import org.dromara.other.domain.OthYs7Device;
|
|
||||||
import org.dromara.other.service.IOthYs7DeviceService;
|
|
||||||
import org.dromara.manager.weathermanager.vo.WeatherVo;
|
import org.dromara.manager.weathermanager.vo.WeatherVo;
|
||||||
|
import org.dromara.other.service.IOthYs7DeviceService;
|
||||||
|
import org.dromara.project.domain.BusProject;
|
||||||
import org.dromara.project.domain.vo.project.BusProjectSafetyDayVo;
|
import org.dromara.project.domain.vo.project.BusProjectSafetyDayVo;
|
||||||
import org.dromara.project.domain.vo.projectnews.BusProjectNewsVo;
|
import org.dromara.project.domain.vo.projectnews.BusProjectNewsVo;
|
||||||
|
import org.dromara.project.service.IBusProjectService;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
import java.time.LocalDate;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -59,6 +63,10 @@ public class ProjectBigScreenController {
|
|||||||
|
|
||||||
private final IOthYs7DeviceService othYs7DeviceService;
|
private final IOthYs7DeviceService othYs7DeviceService;
|
||||||
|
|
||||||
|
private final ProjectBigScreenMapper projectBigScreenMapper;
|
||||||
|
|
||||||
|
private final IBusProjectService projectService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询项目土地统计
|
* 查询项目土地统计
|
||||||
*/
|
*/
|
||||||
@ -135,7 +143,14 @@ public class ProjectBigScreenController {
|
|||||||
@GetMapping("/news/{projectId}")
|
@GetMapping("/news/{projectId}")
|
||||||
public R<List<BusProjectNewsVo>> getProjectNews(@NotNull(message = "主键不能为空")
|
public R<List<BusProjectNewsVo>> getProjectNews(@NotNull(message = "主键不能为空")
|
||||||
@PathVariable Long projectId) {
|
@PathVariable Long projectId) {
|
||||||
return R.ok(projectBigScreenService.getProjectNews(projectId));
|
List<BusCorporateEvents> busCorporateEvents = projectBigScreenMapper.getBusCorporateEvents();
|
||||||
|
return R.ok(busCorporateEvents.stream().map(event -> {
|
||||||
|
BusProjectNewsVo vo = new BusProjectNewsVo();
|
||||||
|
vo.setId(event.getId());
|
||||||
|
vo.setTitle(event.getHeadline());
|
||||||
|
vo.setContent(event.getContent());
|
||||||
|
return vo;
|
||||||
|
}).toList());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -145,7 +160,23 @@ public class ProjectBigScreenController {
|
|||||||
@GetMapping("/safetyInspection/{projectId}")
|
@GetMapping("/safetyInspection/{projectId}")
|
||||||
public R<List<ProjectSafetyInspectionVo>> getProjectSafetyInspection(@NotNull(message = "主键不能为空")
|
public R<List<ProjectSafetyInspectionVo>> getProjectSafetyInspection(@NotNull(message = "主键不能为空")
|
||||||
@PathVariable Long projectId) {
|
@PathVariable Long projectId) {
|
||||||
return R.ok(projectBigScreenService.getProjectSafetyInspection(projectId));
|
BusProject project = projectService.getById(projectId);
|
||||||
|
projectId = project.getGoId();
|
||||||
|
String pic;
|
||||||
|
if (projectId == 60) {
|
||||||
|
pic = "http://xny.yj-3d.com:7363/";
|
||||||
|
} else {
|
||||||
|
pic = "http://xny.yj-3d.com:7464/";
|
||||||
|
}
|
||||||
|
List<BusTour> busTours = projectBigScreenMapper.selectTourByProjectId(projectId);
|
||||||
|
return R.ok(busTours.stream().map(tour -> {
|
||||||
|
ProjectSafetyInspectionVo vo = new ProjectSafetyInspectionVo();
|
||||||
|
vo.setId(tour.getId());
|
||||||
|
vo.setViolationType(tour.getTourType());
|
||||||
|
vo.setPicture(pic + tour.getPicture());
|
||||||
|
vo.setCreateTime(tour.getCreatedAt());
|
||||||
|
return vo;
|
||||||
|
}).toList());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -155,7 +186,52 @@ public class ProjectBigScreenController {
|
|||||||
@GetMapping("/people/{projectId}")
|
@GetMapping("/people/{projectId}")
|
||||||
public R<ProjectPeopleVo> getProjectPeople(@NotNull(message = "主键不能为空")
|
public R<ProjectPeopleVo> getProjectPeople(@NotNull(message = "主键不能为空")
|
||||||
@PathVariable Long projectId) {
|
@PathVariable Long projectId) {
|
||||||
return R.ok(projectBigScreenService.getProjectPeople(projectId));
|
BusProject project = projectService.getById(projectId);
|
||||||
|
projectId = project.getGoId();
|
||||||
|
Integer projectUserCount = projectBigScreenMapper.getProjectUserCount(projectId);
|
||||||
|
ProjectPeopleVo vo = new ProjectPeopleVo();
|
||||||
|
vo.setPeopleCount(BigDecimal.valueOf(projectUserCount));
|
||||||
|
Integer attendanceCount = projectBigScreenMapper.getAttendanceCount(projectId, DateUtils.getDate());
|
||||||
|
vo.setAttendanceCount(BigDecimal.valueOf(attendanceCount));
|
||||||
|
vo.setAttendanceRate(BigDecimalUtil.toPercentage(BigDecimal.valueOf(attendanceCount), BigDecimal.valueOf(projectUserCount)));
|
||||||
|
List<BusConstructionUser> projectUserList = projectBigScreenMapper.getProjectUserList(projectId);
|
||||||
|
List<BusProjectTeamByGo> teamList = projectBigScreenMapper.getTeamList(projectId);
|
||||||
|
|
||||||
|
List<ProjectTeamAttendanceVo> teamAttendanceList = new ArrayList<>();
|
||||||
|
String punchRange = project.getPunchRange();
|
||||||
|
String punchTime = "";
|
||||||
|
if (punchRange != null) {
|
||||||
|
String start = punchRange.split(",")[0];
|
||||||
|
punchTime = LocalDate.now() + " " + start;
|
||||||
|
}
|
||||||
|
if (projectUserList != null && teamList != null) {
|
||||||
|
projectUserList = projectUserList.stream().filter(user -> user.getTeamId() != null).toList();
|
||||||
|
Map<Long, List<BusConstructionUser>> userMap = projectUserList.stream()
|
||||||
|
.collect(Collectors.groupingBy(BusConstructionUser::getTeamId));
|
||||||
|
for (BusProjectTeamByGo team : teamList) {
|
||||||
|
ProjectTeamAttendanceVo vo1 = new ProjectTeamAttendanceVo();
|
||||||
|
vo1.setId(team.getId());
|
||||||
|
vo1.setTeamName(team.getName());
|
||||||
|
vo1.setAttendanceTime(punchTime);
|
||||||
|
vo1.setAttendanceNumber(BigDecimal.ZERO);
|
||||||
|
List<BusConstructionUser> userList = userMap.get(team.getId());
|
||||||
|
if (CollUtil.isNotEmpty(userList)) {
|
||||||
|
List<String> list = userList.stream().map(BusConstructionUser::getOpenid).distinct().toList();
|
||||||
|
Integer aCount = projectBigScreenMapper.getAttendanceCountByOpenIds(list, LocalDate.now());
|
||||||
|
vo1.setAttendanceNumber(BigDecimal.valueOf(aCount));
|
||||||
|
}
|
||||||
|
vo1.setAllNumber(BigDecimal.valueOf(userMap.getOrDefault(team.getId(), List.of()).size()));
|
||||||
|
if (vo1.getAttendanceNumber() != null && vo1.getAllNumber() != null && vo1.getAllNumber().compareTo(BigDecimal.ZERO) != 0) {
|
||||||
|
vo1.setAttendanceRate(BigDecimalUtil.toPercentage(vo1.getAttendanceNumber(), vo1.getAllNumber()));
|
||||||
|
} else {
|
||||||
|
vo1.setAttendanceRate(BigDecimal.ZERO);
|
||||||
|
}
|
||||||
|
teamAttendanceList.add(vo1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
vo.setTeamAttendanceList(teamAttendanceList);
|
||||||
|
return R.ok(vo);
|
||||||
|
// return R.ok(projectBigScreenService.getProjectPeople(projectId));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -175,7 +251,16 @@ public class ProjectBigScreenController {
|
|||||||
@GetMapping("/generalize/{projectId}")
|
@GetMapping("/generalize/{projectId}")
|
||||||
public R<String> getProjectGeneralize(@NotNull(message = "主键不能为空")
|
public R<String> getProjectGeneralize(@NotNull(message = "主键不能为空")
|
||||||
@PathVariable Long projectId) {
|
@PathVariable Long projectId) {
|
||||||
return R.ok(projectBigScreenService.getProjectGeneralize(projectId));
|
BusProject project = projectService.getById(projectId);
|
||||||
|
if (project != null) {
|
||||||
|
Long goId = project.getGoId();
|
||||||
|
if (goId != null) {
|
||||||
|
List<SysProjectIntroduce> sysProjectIntroduces = projectBigScreenMapper.selectByProjectId(goId);
|
||||||
|
return R.ok(sysProjectIntroduces.getFirst().getRichText());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// return R.ok(projectBigScreenService.getProjectGeneralize(projectId));
|
||||||
|
return R.ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -266,8 +351,6 @@ public class ProjectBigScreenController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public List<Map<String, Object>> setSxt() {
|
public List<Map<String, Object>> setSxt() {
|
||||||
List<Map<String, Object>> sxtChildrenMap = new ArrayList<>();
|
List<Map<String, Object>> sxtChildrenMap = new ArrayList<>();
|
||||||
HashMap<String, Object> map1 = new HashMap<>();
|
HashMap<String, Object> map1 = new HashMap<>();
|
||||||
@ -310,6 +393,7 @@ public class ProjectBigScreenController {
|
|||||||
|
|
||||||
return sxtChildrenMap;
|
return sxtChildrenMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<Map<String, Object>> setWrj() {
|
public List<Map<String, Object>> setWrj() {
|
||||||
List<Map<String, Object>> sxtChildrenMap = new ArrayList<>();
|
List<Map<String, Object>> sxtChildrenMap = new ArrayList<>();
|
||||||
HashMap<String, Object> map1 = new HashMap<>();
|
HashMap<String, Object> map1 = new HashMap<>();
|
||||||
|
|||||||
@ -0,0 +1,58 @@
|
|||||||
|
package org.dromara.bigscreen.domain;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class BusAttendanceByGo {
|
||||||
|
|
||||||
|
private Long id; // 主键ID
|
||||||
|
|
||||||
|
private String userName; // 人员姓名
|
||||||
|
|
||||||
|
private String pacePhoto; // 人脸照
|
||||||
|
|
||||||
|
private Long projectId; // 项目id
|
||||||
|
|
||||||
|
private String createBy; // 创建者
|
||||||
|
|
||||||
|
private String updateBy; // 更新者
|
||||||
|
|
||||||
|
private LocalDateTime createdAt; // 创建时间
|
||||||
|
|
||||||
|
private LocalDateTime updatedAt; // 更新时间
|
||||||
|
|
||||||
|
private LocalDateTime deletedAt; // 删除时间
|
||||||
|
|
||||||
|
private String clockOn; // 上午打卡
|
||||||
|
|
||||||
|
private String clockOff; // 下午打卡
|
||||||
|
|
||||||
|
private String printingDate; // 年月日打卡时间
|
||||||
|
|
||||||
|
private String isPinch; // 1正常,2迟到,3早退,4缺勤,5补卡
|
||||||
|
|
||||||
|
private String openid; // 微信id
|
||||||
|
|
||||||
|
private String pinchOpenId; // 代打id
|
||||||
|
|
||||||
|
private String clockRecord; // 多次打卡时间记录
|
||||||
|
|
||||||
|
private String pinchUserName; // 代打人姓名
|
||||||
|
|
||||||
|
private String commuter; // 上下班(1上班 2下班)
|
||||||
|
|
||||||
|
private String punchRange; // 打卡范围
|
||||||
|
|
||||||
|
private BigDecimal dailyWage; // 日薪
|
||||||
|
|
||||||
|
private String lng; // 经度
|
||||||
|
|
||||||
|
private String lat; // 纬度
|
||||||
|
|
||||||
|
private String location; // 逆编码地址信息
|
||||||
|
|
||||||
|
private LocalDateTime missing; // 缺卡统一处理时间
|
||||||
|
}
|
||||||
@ -0,0 +1,91 @@
|
|||||||
|
package org.dromara.bigscreen.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@TableName("bus_construction_user")
|
||||||
|
public class BusConstructionUser {
|
||||||
|
|
||||||
|
@TableId(type = IdType.AUTO)
|
||||||
|
private Long id; // 主键ID
|
||||||
|
|
||||||
|
private String openid; // 微信id
|
||||||
|
|
||||||
|
private String nickName; // 微信名称
|
||||||
|
|
||||||
|
private Long teamId; // 班组id
|
||||||
|
|
||||||
|
private String headIcon; // 登陆照片
|
||||||
|
|
||||||
|
private String pacePhoto; // 人脸照
|
||||||
|
|
||||||
|
private String userName; // 人员姓名
|
||||||
|
|
||||||
|
private Long projectId; // 项目id
|
||||||
|
|
||||||
|
private String status; // 状态(0在职 1离职)-字典position_status
|
||||||
|
|
||||||
|
private String isPinch; // 是否代打
|
||||||
|
|
||||||
|
private String ifManagement; // 是否班组管理
|
||||||
|
|
||||||
|
private String createBy; // 创建者
|
||||||
|
|
||||||
|
private String updateBy; // 更新者
|
||||||
|
|
||||||
|
private LocalDateTime createdAt; // 创建时间
|
||||||
|
|
||||||
|
private LocalDateTime updatedAt; // 更新时间
|
||||||
|
|
||||||
|
private LocalDateTime deletedAt; // 删除时间
|
||||||
|
|
||||||
|
private String phone; // 电话
|
||||||
|
|
||||||
|
private String sex; // 1:男,2女,3保密
|
||||||
|
|
||||||
|
private String sfzNation; // 身份证民族
|
||||||
|
|
||||||
|
private String sfzNumber; // 身份证号码
|
||||||
|
|
||||||
|
private String sfzStart; // 身份证有效开始期
|
||||||
|
|
||||||
|
private String sfzEnd; // 身份证有效结束期
|
||||||
|
|
||||||
|
private String sfzSite; // 身份证地址
|
||||||
|
|
||||||
|
private String sfzBirth; // 身份证出生日期
|
||||||
|
|
||||||
|
private String nativePlace; // 籍贯
|
||||||
|
|
||||||
|
private String yhkNumber; // 银行卡号
|
||||||
|
|
||||||
|
private String yhkOpeningBank; // 开户行
|
||||||
|
|
||||||
|
private String yhkCardholder; // 持卡人
|
||||||
|
|
||||||
|
private String typeOfWork; // 工种(字典)
|
||||||
|
|
||||||
|
private String clock; // 打卡(1启用打卡 2禁止打卡)
|
||||||
|
|
||||||
|
private Long labourserviceId; // 劳务公司id
|
||||||
|
|
||||||
|
private String entryDate; // 入场时间
|
||||||
|
|
||||||
|
private String leaveDate; // 离场时间
|
||||||
|
|
||||||
|
private BigDecimal salary; // 薪水(为0表示无效)
|
||||||
|
|
||||||
|
private String projectRecord; // 是否开启项目备案(1开启 2不开启)
|
||||||
|
|
||||||
|
private String wxOrPc; // 哪添加的(1表示pc 2表示小程序)
|
||||||
|
|
||||||
|
private String subscription; // 消息订阅状态(1订阅 2无订阅)
|
||||||
|
|
||||||
|
private String devNum; // 安全帽设备标识
|
||||||
|
}
|
||||||
@ -0,0 +1,52 @@
|
|||||||
|
package org.dromara.bigscreen.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 企业大事记
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("bus_corporate_events")
|
||||||
|
public class BusCorporateEvents {
|
||||||
|
|
||||||
|
@TableId(type = IdType.AUTO)
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 标题
|
||||||
|
*/
|
||||||
|
private String headline;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 内容
|
||||||
|
*/
|
||||||
|
private String content;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建人
|
||||||
|
*/
|
||||||
|
private Long createdBy;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新人
|
||||||
|
*/
|
||||||
|
private Long updatedBy;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
private LocalDateTime createdAt;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*/
|
||||||
|
private LocalDateTime updatedAt;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除时间(软删除标记)
|
||||||
|
*/
|
||||||
|
private LocalDateTime deletedAt;
|
||||||
|
}
|
||||||
@ -0,0 +1,31 @@
|
|||||||
|
package org.dromara.bigscreen.domain;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class BusProjectTeamByGo {
|
||||||
|
|
||||||
|
private Long id; // 主键id
|
||||||
|
|
||||||
|
private Long projectId; // 项目id
|
||||||
|
|
||||||
|
private String name; // 班组名称
|
||||||
|
|
||||||
|
private String isClockIn; // 范围内打卡(0范围内打卡 1任何地点打卡)
|
||||||
|
|
||||||
|
private String punchRange; // 打卡范围(id串)
|
||||||
|
|
||||||
|
private String remark; // 备注
|
||||||
|
|
||||||
|
private String createBy; // 创建者
|
||||||
|
|
||||||
|
private String updateBy; // 更新者
|
||||||
|
|
||||||
|
private Long createDept; // 创建部门
|
||||||
|
|
||||||
|
private LocalDateTime createTime; // 创建时间
|
||||||
|
|
||||||
|
private LocalDateTime updateTime; // 更新时间
|
||||||
|
}
|
||||||
@ -0,0 +1,25 @@
|
|||||||
|
package org.dromara.bigscreen.domain;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class BusProjectTeamMemberByGo {
|
||||||
|
|
||||||
|
private Long id; // 主键id
|
||||||
|
|
||||||
|
private Long teamId; // 班组id
|
||||||
|
|
||||||
|
private Long projectId; // 项目id
|
||||||
|
|
||||||
|
private Long memberId; // 施工人员id
|
||||||
|
|
||||||
|
private String postId; // 岗位(0普通员工,1组长)
|
||||||
|
|
||||||
|
private String remark; // 备注
|
||||||
|
|
||||||
|
private LocalDateTime createTime; // 创建时间
|
||||||
|
|
||||||
|
private LocalDateTime updateTime; // 更新时间
|
||||||
|
}
|
||||||
@ -0,0 +1,35 @@
|
|||||||
|
package org.dromara.bigscreen.domain;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class BusTour {
|
||||||
|
|
||||||
|
private Long id; // 主键ID
|
||||||
|
|
||||||
|
private Long projectId; // 项目id
|
||||||
|
|
||||||
|
private String tourCategory; // 类别字典(如:无人机识别、监控拍摄)
|
||||||
|
|
||||||
|
private String tourType; // 类型字典(如:安全帽、安全带)
|
||||||
|
|
||||||
|
private String picture; // 图片路径
|
||||||
|
|
||||||
|
private Integer num; // 违规数量
|
||||||
|
|
||||||
|
private String describe; // 故障描述
|
||||||
|
|
||||||
|
private Date createdAt; // 创建时间
|
||||||
|
|
||||||
|
private Date updatedAt; // 更新时间
|
||||||
|
|
||||||
|
private Date deletedAt; // 删除时间
|
||||||
|
|
||||||
|
private String tableName; // 表名
|
||||||
|
|
||||||
|
private Long tableId; // 表id
|
||||||
|
|
||||||
|
private String sxtName; // 摄像头名称
|
||||||
|
}
|
||||||
@ -0,0 +1,34 @@
|
|||||||
|
package org.dromara.bigscreen.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@TableName("sys_project_introduce")
|
||||||
|
public class SysProjectIntroduce {
|
||||||
|
|
||||||
|
@TableId(type = IdType.AUTO)
|
||||||
|
private Long id; // 主键id
|
||||||
|
|
||||||
|
private Long projectId; // 项目id
|
||||||
|
|
||||||
|
private String headline; // 标题
|
||||||
|
|
||||||
|
private String richText; // 富文本
|
||||||
|
|
||||||
|
private String createdBy; // 创建人
|
||||||
|
|
||||||
|
private String updatedBy; // 更新人
|
||||||
|
|
||||||
|
private LocalDateTime createdAt; // 创建时间
|
||||||
|
|
||||||
|
private LocalDateTime updatedAt; // 更新时间
|
||||||
|
|
||||||
|
private LocalDateTime deletedAt; // 删除时间
|
||||||
|
|
||||||
|
private String files; // 附件
|
||||||
|
}
|
||||||
@ -24,7 +24,7 @@ public class EnterpriseKeyIndexVo implements Serializable {
|
|||||||
/**
|
/**
|
||||||
* 合同总额(单位:亿元)
|
* 合同总额(单位:亿元)
|
||||||
*/
|
*/
|
||||||
private BigDecimal totalContractAmount;
|
private Long totalContractAmount;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 总容量
|
* 总容量
|
||||||
|
|||||||
@ -0,0 +1,56 @@
|
|||||||
|
package org.dromara.bigscreen.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.apache.ibatis.annotations.Select;
|
||||||
|
import org.dromara.bigscreen.domain.*;
|
||||||
|
|
||||||
|
import java.time.LocalDate;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-09-10 19:32
|
||||||
|
*/
|
||||||
|
@DS("slave")
|
||||||
|
@Mapper
|
||||||
|
public interface ProjectBigScreenMapper {
|
||||||
|
|
||||||
|
@Select("select * from bus_corporate_events limit 10")
|
||||||
|
List<BusCorporateEvents> getBusCorporateEvents();
|
||||||
|
|
||||||
|
@Select("select * from sys_project_introduce where project_id = #{projectId}")
|
||||||
|
List<SysProjectIntroduce> selectByProjectId(@Param("projectId") Long projectId);
|
||||||
|
|
||||||
|
@Select("select count(*) from bus_construction_user where project_id = #{projectId} && deleted_at is NULL")
|
||||||
|
Integer getProjectUserCount(@Param("projectId") Long projectId);
|
||||||
|
|
||||||
|
@Select("select count(*) from bus_attendance where project_id = #{projectId} && printing_date = #{printingDate} && commuter = '1'")
|
||||||
|
Integer getAttendanceCount(@Param("projectId") Long projectId,
|
||||||
|
@Param("printingDate") String printingDate);
|
||||||
|
|
||||||
|
@Select("SELECT * FROM sys_project_team WHERE project_id = #{projectId} && deleted_at is NULL")
|
||||||
|
List<BusProjectTeamByGo> getTeamList(@Param("projectId") Long projectId);
|
||||||
|
|
||||||
|
@Select("SELECT * FROM bus_construction_user WHERE project_id = #{projectId} && deleted_at is NULL")
|
||||||
|
List<BusConstructionUser> getProjectUserList(@Param("projectId") Long projectId);
|
||||||
|
|
||||||
|
@Select({
|
||||||
|
"<script>",
|
||||||
|
"SELECT count(*) ",
|
||||||
|
"FROM bus_attendance ",
|
||||||
|
"WHERE openid IN ",
|
||||||
|
"<foreach collection='openIds' item='id' open='(' separator=',' close=')'>",
|
||||||
|
" #{id}",
|
||||||
|
"</foreach>",
|
||||||
|
"AND printing_date = #{printingDate} ",
|
||||||
|
"AND commuter = '1'",
|
||||||
|
"</script>"
|
||||||
|
})
|
||||||
|
Integer getAttendanceCountByOpenIds(@Param("openIds") List<String> openIds,
|
||||||
|
@Param("printingDate") LocalDate printingDate);
|
||||||
|
|
||||||
|
@Select("SELECT * FROM bus_tour WHERE project_id = #{projectId} AND deleted_at IS NULL LIMIT 10")
|
||||||
|
List<BusTour> selectTourByProjectId(@Param("projectId") Long projectId);
|
||||||
|
}
|
||||||
@ -126,11 +126,11 @@ public class EnterpriseBigScreenServiceImpl implements EnterpriseBigScreenServic
|
|||||||
Long todayProject = progressPlanDetailService.lambdaQuery()
|
Long todayProject = progressPlanDetailService.lambdaQuery()
|
||||||
.select(PgsProgressPlanDetail::getProjectId)
|
.select(PgsProgressPlanDetail::getProjectId)
|
||||||
.eq(PgsProgressPlanDetail::getDate, LocalDate.now())
|
.eq(PgsProgressPlanDetail::getDate, LocalDate.now())
|
||||||
.groupBy(PgsProgressPlanDetail::getProjectId)
|
.list()
|
||||||
.count();
|
.stream().map(PgsProgressPlanDetail::getProjectId).distinct().count();
|
||||||
vo.setOngoingProject((long) projectList.size());
|
vo.setOngoingProject((long) projectList.size());
|
||||||
vo.setTotalCapacity(totalCapacity);
|
vo.setTotalCapacity(totalCapacity);
|
||||||
vo.setTotalContractAmount(totalIncomeAmount.add(totalExpensesAmount));
|
vo.setTotalContractAmount(totalIncomeAmount.add(totalExpensesAmount).longValue());
|
||||||
vo.setTodayProject(todayProject);
|
vo.setTodayProject(todayProject);
|
||||||
return vo;
|
return vo;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user