产值导出,bug修改
This commit is contained in:
@ -5,11 +5,14 @@ import org.dromara.common.core.exception.ServiceException;
|
||||
import org.dromara.common.core.utils.SpringUtils;
|
||||
import org.springframework.aop.interceptor.AsyncUncaughtExceptionHandler;
|
||||
import org.springframework.boot.autoconfigure.AutoConfiguration;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.core.task.VirtualThreadTaskExecutor;
|
||||
import org.springframework.scheduling.annotation.AsyncConfigurer;
|
||||
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.concurrent.Executor;
|
||||
import java.util.concurrent.ThreadPoolExecutor;
|
||||
|
||||
/**
|
||||
* 异步配置
|
||||
@ -26,12 +29,36 @@ public class AsyncConfig implements AsyncConfigurer {
|
||||
*/
|
||||
@Override
|
||||
public Executor getAsyncExecutor() {
|
||||
if(SpringUtils.isVirtual()) {
|
||||
if (SpringUtils.isVirtual()) {
|
||||
return new VirtualThreadTaskExecutor("async-");
|
||||
}
|
||||
return SpringUtils.getBean("scheduledExecutorService");
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增:自定义线程池(可以在 @Async("capturePicExecutor") 使用)
|
||||
*/
|
||||
@Bean("capturePicExecutor")
|
||||
public Executor customExecutor() {
|
||||
ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
|
||||
// 核心线程数
|
||||
executor.setCorePoolSize(5);
|
||||
// 最大线程数
|
||||
executor.setMaxPoolSize(10);
|
||||
// 队列容量(超过核心线程数时,任务进入队列)
|
||||
executor.setQueueCapacity(50);
|
||||
// 空闲线程最大存活时间(秒)
|
||||
executor.setKeepAliveSeconds(60);
|
||||
// 线程名前缀,方便定位日志
|
||||
executor.setThreadNamePrefix("capturePic-async-");
|
||||
// 拒绝策略:当线程池满时
|
||||
executor.setRejectedExecutionHandler(new ThreadPoolExecutor.CallerRunsPolicy());
|
||||
// CallerRunsPolicy:由调用线程执行任务(相对安全)
|
||||
// 初始化
|
||||
executor.initialize();
|
||||
return executor;
|
||||
}
|
||||
|
||||
/**
|
||||
* 异步执行异常处理
|
||||
*/
|
||||
|
||||
@ -96,7 +96,7 @@ public class DashScopeChat {
|
||||
}
|
||||
// 构建生成标题的提示词
|
||||
String prompt = String.format("""
|
||||
请为下面这段用户与AI的对话生成一个简短的标题(不超过10个字),并且以陈述句的形式进行总结:
|
||||
请以陈述句的形式总结下面这段用户与AI的对话生成一个简短的标题(不超过10个字):
|
||||
用户:%s
|
||||
AI:%s
|
||||
""", userMessage, aiResponse);
|
||||
|
||||
@ -0,0 +1,70 @@
|
||||
package org.dromara.bigscreen.domain.vo;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.dromara.common.excel.annotation.ExcelDictFormat;
|
||||
import org.dromara.common.excel.convert.ExcelDictConvert;
|
||||
|
||||
import java.time.LocalDate;
|
||||
|
||||
/**
|
||||
* @author lilemy
|
||||
* @date 2025-11-06 14:28
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class MilestoneVo {
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 节点名称
|
||||
*/
|
||||
private String nodeName;
|
||||
|
||||
/**
|
||||
* 对应项目结构
|
||||
*/
|
||||
private Long projectStructure;
|
||||
|
||||
/**
|
||||
* 对应项目结构名称
|
||||
*/
|
||||
private String projectStructureName;
|
||||
|
||||
/**
|
||||
* 预计开始时间
|
||||
*/
|
||||
private LocalDate planStartDate;
|
||||
|
||||
/**
|
||||
* 预计结束时间
|
||||
*/
|
||||
private LocalDate planEndDate;
|
||||
|
||||
/**
|
||||
* 实际开始时间
|
||||
*/
|
||||
private LocalDate practicalStartDate;
|
||||
|
||||
/**
|
||||
* 实际结束时间
|
||||
*/
|
||||
private LocalDate practicalEndDate;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
}
|
||||
@ -0,0 +1,55 @@
|
||||
package org.dromara.bigscreen.domain.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author lilemy
|
||||
* @date 2025-11-06 10:01
|
||||
*/
|
||||
@Data
|
||||
public class MyProjectInfoVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 2737004515142334438L;
|
||||
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
private Long projectId;
|
||||
|
||||
/**
|
||||
* 项目名称
|
||||
*/
|
||||
private String projectName;
|
||||
|
||||
/**
|
||||
* 项目概括
|
||||
*/
|
||||
private String projectGeneralize;
|
||||
|
||||
/**
|
||||
* 开始时间
|
||||
*/
|
||||
private LocalDate StartTime;
|
||||
|
||||
/**
|
||||
* 结束时间
|
||||
*/
|
||||
private LocalDate endTime;
|
||||
|
||||
/**
|
||||
* 里程碑
|
||||
*/
|
||||
private List<MilestoneVo> milestones;
|
||||
|
||||
/**
|
||||
* 进度
|
||||
*/
|
||||
private BigDecimal progress;
|
||||
}
|
||||
@ -16,6 +16,11 @@ public class ProjectImageProgressDetailVo implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = -8317739851423164942L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 进度名称
|
||||
*/
|
||||
@ -36,4 +41,9 @@ public class ProjectImageProgressDetailVo implements Serializable {
|
||||
*/
|
||||
private BigDecimal totalProgress;
|
||||
|
||||
/**
|
||||
* 单位
|
||||
*/
|
||||
private String unit;
|
||||
|
||||
}
|
||||
|
||||
@ -438,9 +438,15 @@ public class ProjectBigScreenServiceImpl implements ProjectBigScreenService {
|
||||
Long projectId = req.getProjectId();
|
||||
String progressName = req.getProgressName();
|
||||
checkProject(projectId);
|
||||
// 获取当前项目的所有子级
|
||||
List<BusProject> subProjects = projectService.lambdaQuery()
|
||||
.eq(BusProject::getPId, projectId)
|
||||
.list();
|
||||
Set<Long> projectIds = subProjects.stream().map(BusProject::getId).collect(Collectors.toSet());
|
||||
projectIds.add(projectId);
|
||||
// 获取对应进度
|
||||
PgsProgressCategory progressCategory = progressCategoryService.lambdaQuery()
|
||||
.eq(PgsProgressCategory::getProjectId, projectId)
|
||||
.in(PgsProgressCategory::getProjectId, projectIds)
|
||||
.eq(PgsProgressCategory::getName, progressName)
|
||||
.last("limit 1")
|
||||
.one();
|
||||
@ -491,6 +497,8 @@ public class ProjectBigScreenServiceImpl implements ProjectBigScreenService {
|
||||
BigDecimal total = children.stream().map(PgsProgressCategory::getTotal)
|
||||
.reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||
ProjectImageProgressDetailVo vo = new ProjectImageProgressDetailVo();
|
||||
vo.setId(c.getId());
|
||||
vo.setUnit(c.getUnit());
|
||||
vo.setProgressName(c.getName());
|
||||
vo.setPlanProgress(plan);
|
||||
vo.setActualProgress(actual);
|
||||
@ -711,7 +719,7 @@ public class ProjectBigScreenServiceImpl implements ProjectBigScreenService {
|
||||
// 获取当前时间
|
||||
LocalDateTime now = LocalDateTime.now();
|
||||
List<GpsEquipmentSonVo> voList = gpsEquipmentService.getUeClientList(startOfDay, now);
|
||||
List<GpsEquipmentSonVo> appList = gpsEquipmentService.getUeUserListByProjectId( startOfDay, now);
|
||||
List<GpsEquipmentSonVo> appList = gpsEquipmentService.getUeUserListByProjectId(startOfDay, now);
|
||||
// List<LocationVo> anqmList = deviceService.getUeUserListByProjectId( startOfDay, now);
|
||||
// List<OthYs7Device> othYs7DeviceList = othYs7DeviceService.lambdaQuery()
|
||||
// .list();
|
||||
|
||||
@ -49,10 +49,10 @@ public class IncSyncYs7DeviceCapturePicData {
|
||||
@Resource
|
||||
private Ys7Manager ys7Manager;
|
||||
|
||||
private final ExecutorService executorService = Executors.newFixedThreadPool(5);
|
||||
private final ExecutorService executorService = Executors.newFixedThreadPool(8);
|
||||
|
||||
// 每 15 分钟执行一次
|
||||
@Scheduled(cron = "0 */10 7-19 * * ?")
|
||||
@Scheduled(cron = "0 */15 7-19 * * ?")
|
||||
public void run() {
|
||||
log.info("执行萤石设备抓拍图片");
|
||||
// 获取所有项目的等级信息
|
||||
@ -60,9 +60,8 @@ public class IncSyncYs7DeviceCapturePicData {
|
||||
.select(HseViolationLevel::getId, HseViolationLevel::getProjectId)
|
||||
.list();
|
||||
Set<Long> projectIds = allLevel.stream().map(HseViolationLevel::getProjectId).collect(Collectors.toSet());
|
||||
// 查询所有在线的摄像头设备,仅获取必要字段
|
||||
// 查询所有在线的摄像头设备
|
||||
List<OthYs7Device> deviceList = ys7DeviceService.lambdaQuery()
|
||||
.select(OthYs7Device::getId, OthYs7Device::getDeviceSerial, OthYs7Device::getDeviceName)
|
||||
.in(OthYs7Device::getProjectId, projectIds) // 仅获取设置了安全等级项目的摄像头
|
||||
.eq(OthYs7Device::getStatus, OthDeviceStatusEnum.ONLINE.getValue())
|
||||
.list();
|
||||
|
||||
@ -13,10 +13,10 @@ import java.util.stream.Collectors;
|
||||
@Getter
|
||||
public enum RecognizerTypeEnum {
|
||||
|
||||
WEARING_ALL("穿戴安全帽反光衣", "wearingall", "1"),
|
||||
NO_EQUIPMENT("没穿安全帽反光衣", "noequipment", "2"),
|
||||
NO_HELMET("有反光衣没安全帽", "nohelmet", "3"),
|
||||
NO_VEST("有安全帽没反光衣", "novest", "4"),
|
||||
// WEARING_ALL("穿戴安全帽反光衣", "wearingall", "1"),
|
||||
// NO_EQUIPMENT("没穿安全帽反光衣", "noequipment", "2"),
|
||||
NO_HELMET("未戴安全帽", "nohelmet", "3"),
|
||||
NO_VEST("未穿反光衣", "novest", "4"),
|
||||
SMOKE("吸烟", "smoke", "5"),
|
||||
FIRE("火焰", "fire", "6"),
|
||||
SMOGGY("烟雾", "smoggy", "7"),
|
||||
|
||||
@ -27,6 +27,11 @@ public class OthYs7DeviceImg implements Serializable {
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
private Long projectId;
|
||||
|
||||
/**
|
||||
* 设备序列号
|
||||
*/
|
||||
|
||||
@ -18,6 +18,11 @@ public class OthYs7DeviceImgQueryReq implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 5264959525029608917L;
|
||||
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
private Long projectId;
|
||||
|
||||
/**
|
||||
* 设备序列号
|
||||
*/
|
||||
|
||||
@ -32,6 +32,11 @@ public class OthYs7DeviceImgVo implements Serializable {
|
||||
@ExcelProperty(value = "主键id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
private Long projectId;
|
||||
|
||||
/**
|
||||
* 设备序列号
|
||||
*/
|
||||
|
||||
@ -39,6 +39,7 @@ import org.dromara.safety.service.IHseViolationLevelService;
|
||||
import org.dromara.system.domain.vo.SysOssUploadVo;
|
||||
import org.dromara.system.service.ISysOssService;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.scheduling.annotation.Async;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
@ -146,9 +147,11 @@ public class OthYs7DeviceImgServiceImpl extends ServiceImpl<OthYs7DeviceImgMappe
|
||||
if (req == null) {
|
||||
return lqw;
|
||||
}
|
||||
Long projectId = req.getProjectId();
|
||||
String deviceSerial = req.getDeviceSerial();
|
||||
String deviceName = req.getDeviceName();
|
||||
Date createTime = req.getCreateTime();
|
||||
lqw.eq(projectId != null, OthYs7DeviceImg::getProjectId, projectId);
|
||||
lqw.like(StringUtils.isNotBlank(deviceSerial), OthYs7DeviceImg::getDeviceSerial, deviceSerial);
|
||||
lqw.like(StringUtils.isNotBlank(deviceName), OthYs7DeviceImg::getDeviceName, deviceName);
|
||||
if (createTime != null) {
|
||||
@ -194,7 +197,12 @@ public class OthYs7DeviceImgServiceImpl extends ServiceImpl<OthYs7DeviceImgMappe
|
||||
vo.setUrl(deviceImg.getRecognizeUrl());
|
||||
}
|
||||
List<String> recTypeList = JSONUtil.toList(deviceImg.getRecType(), String.class);
|
||||
List<String> list = recTypeList.stream().map(recType -> Objects.requireNonNull(RecognizerTypeEnum.fromValue(recType)).getText()).toList();
|
||||
List<String> list = recTypeList.stream()
|
||||
.map(recType -> {
|
||||
RecognizerTypeEnum type = RecognizerTypeEnum.fromValue(recType);
|
||||
return type != null ? type.getText() : "未知类型";
|
||||
})
|
||||
.toList();
|
||||
vo.setRecTypeList(list);
|
||||
return vo;
|
||||
}).toList();
|
||||
@ -208,6 +216,7 @@ public class OthYs7DeviceImgServiceImpl extends ServiceImpl<OthYs7DeviceImgMappe
|
||||
* @param imgList 抓拍图片列表
|
||||
*/
|
||||
@Override
|
||||
@Async("capturePicExecutor")
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void saveCapturePic(List<OthYs7DeviceImgCreateByCapture> imgList) {
|
||||
List<OthYs7DeviceImg> saveList = new ArrayList<>();
|
||||
@ -245,6 +254,7 @@ public class OthYs7DeviceImgServiceImpl extends ServiceImpl<OthYs7DeviceImgMappe
|
||||
SysOssUploadVo uploadVo = ossService.uploadFileUrlWithNoSave(url, deviceImgOssPath);
|
||||
String ossUrl = uploadVo.getUrl();
|
||||
if (StringUtils.isNotBlank(ossUrl)) {
|
||||
othYs7DeviceImg.setProjectId(img.getProjectId());
|
||||
othYs7DeviceImg.setDeviceSerial(deviceSerial);
|
||||
othYs7DeviceImg.setCreateTime(img.getCreateTime());
|
||||
othYs7DeviceImg.setDeviceName(img.getDeviceName());
|
||||
@ -296,21 +306,24 @@ public class OthYs7DeviceImgServiceImpl extends ServiceImpl<OthYs7DeviceImgMappe
|
||||
record.setPicture(targetUrl);
|
||||
record.setRecordCategory(HseRecordCategoryEnum.MONITOR.getValue());
|
||||
record.setProjectId(img.getProjectId());
|
||||
// 保存识别记录
|
||||
recognizeRecordService.saveByMonitor(List.of(record));
|
||||
recordList.add(record);
|
||||
}
|
||||
saveList.add(othYs7DeviceImg);
|
||||
// 保存抓拍记录
|
||||
boolean save = this.save(othYs7DeviceImg);
|
||||
if (!save) {
|
||||
log.error("保存图片失败:{}", othYs7DeviceImg);
|
||||
}else {
|
||||
saveList.add(othYs7DeviceImg);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (CollUtil.isNotEmpty(saveList)) {
|
||||
log.info("批量保存抓拍图片开始,共:{} 张", saveList.size());
|
||||
boolean result = saveBatch(saveList);
|
||||
if (!result) {
|
||||
throw new ServiceException("批量新增图片失败,数据库异常", HttpStatus.ERROR);
|
||||
}
|
||||
log.info("批量保存抓拍图片完成,共:{} 张", saveList.size());
|
||||
}
|
||||
if (CollUtil.isNotEmpty(recordList)) {
|
||||
log.info("批量保存识别记录开始,共:{} 条", recordList.size());
|
||||
recognizeRecordService.saveByMonitor(recordList);
|
||||
log.info("批量保存识别记录完成,共:{} 条", recordList.size());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -4,6 +4,8 @@ import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import org.dromara.common.excel.annotation.ExcelDictFormat;
|
||||
import org.dromara.common.excel.convert.ExcelDictConvert;
|
||||
import org.dromara.common.translation.annotation.Translation;
|
||||
import org.dromara.common.translation.constant.TransConstant;
|
||||
import org.dromara.out.domain.OutConstructionValue;
|
||||
@ -31,7 +33,6 @@ public class OutConstructionValueVo implements Serializable {
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@ExcelProperty(value = "主键ID")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
@ -42,7 +43,6 @@ public class OutConstructionValueVo implements Serializable {
|
||||
/**
|
||||
* 项目ID
|
||||
*/
|
||||
@ExcelProperty(value = "项目ID")
|
||||
private Long projectId;
|
||||
|
||||
/**
|
||||
@ -54,19 +54,17 @@ public class OutConstructionValueVo implements Serializable {
|
||||
/**
|
||||
* 子项目ID
|
||||
*/
|
||||
@ExcelProperty(value = "子项目ID")
|
||||
private Long subProjectId;
|
||||
|
||||
/**
|
||||
* 子项目名
|
||||
*/
|
||||
@ExcelProperty(value = "子项目名")
|
||||
@ExcelProperty(value = "项目子项")
|
||||
private String subProjectName;
|
||||
|
||||
/**
|
||||
* 方阵id
|
||||
*/
|
||||
@ExcelProperty(value = "方阵id")
|
||||
private Long matrixId;
|
||||
|
||||
/**
|
||||
@ -78,7 +76,6 @@ public class OutConstructionValueVo implements Serializable {
|
||||
/**
|
||||
* 分部工程id
|
||||
*/
|
||||
@ExcelProperty(value = "分部工程id")
|
||||
private Long categoryId;
|
||||
|
||||
/**
|
||||
@ -90,7 +87,6 @@ public class OutConstructionValueVo implements Serializable {
|
||||
/**
|
||||
* 分项工程id
|
||||
*/
|
||||
@ExcelProperty(value = "分项工程id")
|
||||
private Long progressCategoryId;
|
||||
|
||||
/**
|
||||
@ -104,6 +100,19 @@ public class OutConstructionValueVo implements Serializable {
|
||||
*/
|
||||
private Long detailId;
|
||||
|
||||
/**
|
||||
* 上报日期
|
||||
*/
|
||||
@ExcelProperty(value = "上报日期")
|
||||
private LocalDate reportDate;
|
||||
|
||||
/**
|
||||
* 计量方式(0无 1数量 2百分比)
|
||||
*/
|
||||
@ExcelProperty(value = "计量方式", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "0=无,1=数量,2=百分比")
|
||||
private String unitType;
|
||||
|
||||
/**
|
||||
* 人工填报数量
|
||||
*/
|
||||
@ -116,12 +125,6 @@ public class OutConstructionValueVo implements Serializable {
|
||||
@ExcelProperty(value = "无人机识别数量")
|
||||
private Integer uavNum;
|
||||
|
||||
/**
|
||||
* 确认数量
|
||||
*/
|
||||
@ExcelProperty(value = "确认数量")
|
||||
private Integer confirmNum;
|
||||
|
||||
/**
|
||||
* 计划数量
|
||||
*/
|
||||
@ -130,25 +133,39 @@ public class OutConstructionValueVo implements Serializable {
|
||||
/**
|
||||
* 综合单价(业主)
|
||||
*/
|
||||
@ExcelProperty(value = "综合单价(业主)")
|
||||
private BigDecimal ownerPrice;
|
||||
|
||||
/**
|
||||
* 综合单价(分包)
|
||||
*/
|
||||
@ExcelProperty(value = "综合单价(分包)")
|
||||
private BigDecimal constructionPrice;
|
||||
|
||||
/**
|
||||
* 确认数量
|
||||
*/
|
||||
@ExcelProperty(value = "确认数量")
|
||||
private Integer confirmNum;
|
||||
|
||||
/**
|
||||
* 单位
|
||||
*/
|
||||
@ExcelProperty(value = "单位")
|
||||
private String unit;
|
||||
|
||||
/**
|
||||
* 对甲产值
|
||||
*/
|
||||
@ExcelProperty(value = "对甲产值")
|
||||
private BigDecimal ownerValue;
|
||||
|
||||
/**
|
||||
* 产值
|
||||
*/
|
||||
@ExcelProperty(value = "产值")
|
||||
@ExcelProperty(value = "对乙产值")
|
||||
private BigDecimal outValue;
|
||||
|
||||
/**
|
||||
* 上报日期
|
||||
*/
|
||||
@ExcelProperty(value = "上报日期")
|
||||
private LocalDate reportDate;
|
||||
|
||||
/**
|
||||
* 计划日期
|
||||
*/
|
||||
@ -157,7 +174,6 @@ public class OutConstructionValueVo implements Serializable {
|
||||
/**
|
||||
* 审核状态
|
||||
*/
|
||||
@ExcelProperty(value = "审核状态")
|
||||
private String auditStatus;
|
||||
|
||||
/**
|
||||
@ -168,30 +184,14 @@ public class OutConstructionValueVo implements Serializable {
|
||||
/**
|
||||
* 上报人
|
||||
*/
|
||||
@ExcelProperty(value = "上报人")
|
||||
@Translation(type = TransConstant.USER_ID_TO_NAME, mapper = "createBy")
|
||||
private String createByName;
|
||||
|
||||
/**
|
||||
* 对甲产值
|
||||
*/
|
||||
private BigDecimal ownerValue;
|
||||
|
||||
/**
|
||||
* 工作类型
|
||||
*/
|
||||
private String workType;
|
||||
|
||||
/**
|
||||
* 计量方式(0无 1数量 2百分比)
|
||||
*/
|
||||
private String unitType;
|
||||
|
||||
/**
|
||||
* 单位
|
||||
*/
|
||||
private String unit;
|
||||
|
||||
/**
|
||||
* 完成数量
|
||||
*/
|
||||
|
||||
@ -168,7 +168,6 @@ public class PgsProgressCategoryServiceImpl extends ServiceImpl<PgsProgressCateg
|
||||
// 获取当前进度数量和完成数量总和
|
||||
BigDecimal total = progressCategory.getTotal();
|
||||
PgsProgressCategoryLastTimeVo lastTimeVo = new PgsProgressCategoryLastTimeVo();
|
||||
;
|
||||
if (total.compareTo(BigDecimal.ZERO) > 0) {
|
||||
BigDecimal allNumber = progressPlanService.getCurrentPlanAndFinishedNumber(progressCategory);
|
||||
total = PgsProgressUnitTypeEnum.PERCENTAGE.getValue().equals(progressCategory.getUnitType()) ?
|
||||
|
||||
@ -71,4 +71,9 @@ public class VehVehicleTripQueryReq implements Serializable {
|
||||
*/
|
||||
private String tripStatus;
|
||||
|
||||
/**
|
||||
* 车牌号
|
||||
*/
|
||||
private String plateNumber;
|
||||
|
||||
}
|
||||
|
||||
@ -198,6 +198,7 @@ public class VehVehicleTripServiceImpl extends ServiceImpl<VehVehicleTripMapper,
|
||||
lqw.eq(req.getProjectId() != null, VehVehicleTrip::getProjectId, req.getProjectId());
|
||||
lqw.like(StringUtils.isNotBlank(req.getStartPlace()), VehVehicleTrip::getStartPlace, req.getStartPlace());
|
||||
lqw.like(StringUtils.isNotBlank(req.getEndPlace()), VehVehicleTrip::getEndPlace, req.getEndPlace());
|
||||
lqw.like(StringUtils.isNotBlank(req.getPlateNumber()), VehVehicleTrip::getPlateNumber, req.getPlateNumber());
|
||||
lqw.ge(req.getPeopleNum() != null, VehVehicleTrip::getPeopleNum, req.getPeopleNum());
|
||||
lqw.eq(req.getReviewStatus() != null, VehVehicleTrip::getReviewStatus, req.getReviewStatus());
|
||||
lqw.eq(req.getTripStatus() != null, VehVehicleTrip::getTripStatus, req.getTripStatus());
|
||||
|
||||
@ -5,6 +5,8 @@
|
||||
<mapper namespace="org.dromara.vehicle.mapper.VehVehicleTripMapper">
|
||||
|
||||
<select id="selectVehicleTripPage" resultType="org.dromara.vehicle.domain.vo.VehVehicleTripVo">
|
||||
SELECT *
|
||||
FROM (
|
||||
SELECT
|
||||
id,
|
||||
project_id,
|
||||
@ -91,9 +93,8 @@
|
||||
), 2) AS total_score
|
||||
|
||||
FROM veh_vehicle_trip
|
||||
where left_seat > 0
|
||||
-- 只保留总评分 >= 60 的数据
|
||||
and total_score >= 60
|
||||
|
||||
WHERE left_seat > 0
|
||||
<if test="req.projectId != null">
|
||||
AND project_id = #{req.projectId}
|
||||
</if>
|
||||
@ -103,8 +104,14 @@
|
||||
<if test="req.tripStatus != null">
|
||||
AND trip_status = #{req.tripStatus}
|
||||
</if>
|
||||
<if test="req.plateNumber != null">
|
||||
AND plate_number LIKE CONCAT('%', #{req.plateNumber}, '%')
|
||||
</if>
|
||||
) AS t
|
||||
|
||||
ORDER BY total_score DESC
|
||||
WHERE t.total_score >= 60
|
||||
|
||||
ORDER BY t.total_score DESC
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user