接go数据
This commit is contained in:
@ -53,13 +53,13 @@ spring:
|
||||
username: xinnengyuandev
|
||||
password: StRWCZdZirysNSs2
|
||||
# 从库数据源
|
||||
# slave:
|
||||
# lazy: true
|
||||
# type: ${spring.datasource.type}
|
||||
# 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
|
||||
# username: zmkgdev
|
||||
# password: JhYxREf25AXdy3h8
|
||||
slave:
|
||||
lazy: true
|
||||
type: ${spring.datasource.type}
|
||||
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
|
||||
username: zmkgdev
|
||||
password: JhYxREf25AXdy3h8
|
||||
# oracle:
|
||||
# type: ${spring.datasource.type}
|
||||
# driverClassName: oracle.jdbc.OracleDriver
|
||||
@ -287,7 +287,7 @@ sparta:
|
||||
id-card:
|
||||
encrypt-key: 7ae260d150a14027d2238a1cf80a48ef
|
||||
recognizer:
|
||||
url: http://192.168.110.5:50070
|
||||
url: http://192.168.110.5:50071
|
||||
|
||||
qrCode:
|
||||
url: http://192.168.110.151:7788
|
||||
|
||||
@ -273,7 +273,7 @@ weather:
|
||||
api-host: n35rk53njv.re.qweatherapi.com
|
||||
# dxf转 geojson 执行文件名
|
||||
dxf2GeoJson:
|
||||
file-name: main.exe
|
||||
file-name: main
|
||||
ys7:
|
||||
app-key: 3acf9f1a43dc4209841e0893003db0a2
|
||||
app-secret: 4bbf3e9394f55d3af6e3af27b2d3db36
|
||||
@ -286,7 +286,7 @@ sparta:
|
||||
id-card:
|
||||
encrypt-key: 7ae260d150a14027d2238a1cf80a48ef
|
||||
recognizer:
|
||||
url: http://192.168.110.5:50070
|
||||
url: http://192.168.110.5:50071
|
||||
|
||||
qrCode:
|
||||
url: http://xny.yj-3d.com:7788
|
||||
|
||||
@ -1,19 +1,21 @@
|
||||
package org.dromara.bigscreen.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.dromara.bigscreen.domain.vo.ProjectImageProgressVo;
|
||||
import org.dromara.bigscreen.domain.vo.ProjectLandVo;
|
||||
import org.dromara.bigscreen.domain.vo.ProjectPeopleVo;
|
||||
import org.dromara.bigscreen.domain.vo.ProjectSafetyInspectionVo;
|
||||
import org.dromara.bigscreen.domain.*;
|
||||
import org.dromara.bigscreen.domain.vo.*;
|
||||
import org.dromara.bigscreen.mapper.ProjectBigScreenMapper;
|
||||
import org.dromara.bigscreen.service.ProjectBigScreenService;
|
||||
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.log.annotation.Log;
|
||||
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.vo.GpsEquipmentSonVo;
|
||||
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.service.IBusLandBlockService;
|
||||
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.other.service.IOthYs7DeviceService;
|
||||
import org.dromara.project.domain.BusProject;
|
||||
import org.dromara.project.domain.vo.project.BusProjectSafetyDayVo;
|
||||
import org.dromara.project.domain.vo.projectnews.BusProjectNewsVo;
|
||||
import org.dromara.project.service.IBusProjectService;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
@ -59,6 +63,10 @@ public class ProjectBigScreenController {
|
||||
|
||||
private final IOthYs7DeviceService othYs7DeviceService;
|
||||
|
||||
private final ProjectBigScreenMapper projectBigScreenMapper;
|
||||
|
||||
private final IBusProjectService projectService;
|
||||
|
||||
/**
|
||||
* 查询项目土地统计
|
||||
*/
|
||||
@ -135,7 +143,14 @@ public class ProjectBigScreenController {
|
||||
@GetMapping("/news/{projectId}")
|
||||
public R<List<BusProjectNewsVo>> getProjectNews(@NotNull(message = "主键不能为空")
|
||||
@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}")
|
||||
public R<List<ProjectSafetyInspectionVo>> getProjectSafetyInspection(@NotNull(message = "主键不能为空")
|
||||
@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}")
|
||||
public R<ProjectPeopleVo> getProjectPeople(@NotNull(message = "主键不能为空")
|
||||
@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}")
|
||||
public R<String> getProjectGeneralize(@NotNull(message = "主键不能为空")
|
||||
@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();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -183,8 +268,8 @@ public class ProjectBigScreenController {
|
||||
*/
|
||||
@SaCheckPermission("project:bigScreen:getClientList")
|
||||
@GetMapping("/getClientList/{projectId}")
|
||||
public R<List<Map<String,Object>>> getClientList(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long projectId) {
|
||||
public R<List<Map<String, Object>>> getClientList(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long projectId) {
|
||||
List<GpsEquipmentSonVo> voList = gpsEquipmentService.getClientList(projectId);
|
||||
// List<OthYs7Device> othYs7DeviceList = othYs7DeviceService.lambdaQuery()
|
||||
// .eq(OthYs7Device::getProjectId, projectId)
|
||||
@ -225,17 +310,17 @@ public class ProjectBigScreenController {
|
||||
List<Map<String, Object>> maps1 = setSxt();
|
||||
List<Map<String, Object>> maps2 = setWrj();
|
||||
|
||||
gpsMap.put("id",1);
|
||||
gpsMap.put("label","定位设备");
|
||||
gpsMap.put("children",gpsChildrenMap);
|
||||
sxtMap.put("id",2);
|
||||
sxtMap.put("label","摄像头");
|
||||
gpsMap.put("id", 1);
|
||||
gpsMap.put("label", "定位设备");
|
||||
gpsMap.put("children", gpsChildrenMap);
|
||||
sxtMap.put("id", 2);
|
||||
sxtMap.put("label", "摄像头");
|
||||
// sxtMap.put("children",sxtChildrenMap);
|
||||
sxtMap.put("children",maps1);
|
||||
wrjMap.put("id",3);
|
||||
wrjMap.put("label","无人机");
|
||||
sxtMap.put("children", maps1);
|
||||
wrjMap.put("id", 3);
|
||||
wrjMap.put("label", "无人机");
|
||||
// wrjMap.put("children",wrjChildrenMap);
|
||||
wrjMap.put("children",maps2);
|
||||
wrjMap.put("children", maps2);
|
||||
|
||||
|
||||
maps.add(gpsMap);
|
||||
@ -266,9 +351,7 @@ public class ProjectBigScreenController {
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public List<Map<String, Object>> setSxt(){
|
||||
public List<Map<String, Object>> setSxt() {
|
||||
List<Map<String, Object>> sxtChildrenMap = new ArrayList<>();
|
||||
HashMap<String, Object> map1 = new HashMap<>();
|
||||
map1.put("id", "55");
|
||||
@ -310,7 +393,8 @@ public class ProjectBigScreenController {
|
||||
|
||||
return sxtChildrenMap;
|
||||
}
|
||||
public List<Map<String, Object>> setWrj(){
|
||||
|
||||
public List<Map<String, Object>> setWrj() {
|
||||
List<Map<String, Object>> sxtChildrenMap = new ArrayList<>();
|
||||
HashMap<String, Object> map1 = new HashMap<>();
|
||||
map1.put("id", "65");
|
||||
|
||||
@ -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()
|
||||
.select(PgsProgressPlanDetail::getProjectId)
|
||||
.eq(PgsProgressPlanDetail::getDate, LocalDate.now())
|
||||
.groupBy(PgsProgressPlanDetail::getProjectId)
|
||||
.count();
|
||||
.list()
|
||||
.stream().map(PgsProgressPlanDetail::getProjectId).distinct().count();
|
||||
vo.setOngoingProject((long) projectList.size());
|
||||
vo.setTotalCapacity(totalCapacity);
|
||||
vo.setTotalContractAmount(totalIncomeAmount.add(totalExpensesAmount));
|
||||
vo.setTotalContractAmount(totalIncomeAmount.add(totalExpensesAmount).longValue());
|
||||
vo.setTodayProject(todayProject);
|
||||
return vo;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user