大屏质量、物资、识别记录

This commit is contained in:
lcj
2025-10-14 15:12:32 +08:00
parent 253ef81066
commit d6263c6430
11 changed files with 102 additions and 45 deletions

View File

@ -3,6 +3,10 @@ package org.dromara.test;
import cn.hutool.core.collection.CollUtil; import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.io.FileUtil; import cn.hutool.core.io.FileUtil;
import cn.hutool.core.util.IdcardUtil; import cn.hutool.core.util.IdcardUtil;
import cn.hutool.http.HttpRequest;
import cn.hutool.http.HttpResponse;
import cn.hutool.json.JSONObject;
import cn.hutool.json.JSONUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.toolkit.IdWorker; import com.baomidou.mybatisplus.core.toolkit.IdWorker;
@ -22,6 +26,11 @@ import org.dromara.facility.service.IFacMatrixService;
import org.dromara.facility.service.IFacPhotovoltaicPanelPartsService; import org.dromara.facility.service.IFacPhotovoltaicPanelPartsService;
import org.dromara.facility.service.IFacPhotovoltaicPanelService; import org.dromara.facility.service.IFacPhotovoltaicPanelService;
import org.dromara.manager.recognizermanager.vo.RecognizeConvertCoordinateResult; import org.dromara.manager.recognizermanager.vo.RecognizeConvertCoordinateResult;
import org.dromara.manager.ys7manager.Ys7Constant;
import org.dromara.manager.ys7manager.Ys7Manager;
import org.dromara.manager.ys7manager.vo.Ys7ResponseVo;
import org.dromara.other.domain.OthYs7Device;
import org.dromara.other.service.IOthYs7DeviceService;
import org.dromara.out.domain.OutConstructionValue; import org.dromara.out.domain.OutConstructionValue;
import org.dromara.out.domain.OutConstructionValueRange; import org.dromara.out.domain.OutConstructionValueRange;
import org.dromara.out.service.IOutConstructionValueRangeService; import org.dromara.out.service.IOutConstructionValueRangeService;
@ -101,6 +110,12 @@ public class DemoTest {
@Resource @Resource
private IOutConstructionValueService constructionValueService; private IOutConstructionValueService constructionValueService;
@Resource
private IOthYs7DeviceService ys7DeviceService;
@Resource
private Ys7Manager ys7Manager;
@Test @Test
void testConstructionValue() { void testConstructionValue() {
@ -114,7 +129,7 @@ public class DemoTest {
log.info("执行定时任务:同步 {}至{} 计划详情到施工产值", lastMonday, lastSunday); log.info("执行定时任务:同步 {}至{} 计划详情到施工产值", lastMonday, lastSunday);
Boolean synced = progressPlanDetailService.syncPlanDetail2ConstructionValue(lastMonday, lastSunday, null);*/ Boolean synced = progressPlanDetailService.syncPlanDetail2ConstructionValue(lastMonday, lastSunday, null);*/
LocalDate start = LocalDate.of(2024, 1, 1); // 起始时间2024-01-01 LocalDate start = LocalDate.of(2024, 1, 1); // 起始时间2024-01-01
LocalDate end = LocalDate.of(2025, 9, 15); // 截止时间2025-09-15 LocalDate end = LocalDate.of(2025, 10, 13); // 截止时间2025-09-15
// 如果起始不是周一,调整到当周的周一 // 如果起始不是周一,调整到当周的周一
if (start.getDayOfWeek() != DayOfWeek.MONDAY) { if (start.getDayOfWeek() != DayOfWeek.MONDAY) {
@ -505,4 +520,32 @@ public class DemoTest {
} }
} }
@Test
void openSxtLx() {
String token = ys7Manager.getToken();
List<OthYs7Device> list = ys7DeviceService.list();
for (OthYs7Device othYs7Device : list) {
HashMap<String, Object> paramMap = new HashMap<>();
paramMap.put("accessToken", token);
paramMap.put("deviceSerial", othYs7Device.getDeviceSerial());
paramMap.put("enable", 1);
String errorMsg = "Ys7 Token 请求失败";
try (HttpResponse response = HttpRequest.post(Ys7Constant.setDeviceVideoUrlByPost)
.form(paramMap)
.execute()) {
if (!response.isOk()) {
log.error("{}{}", errorMsg, response.getStatus());
// throw new ServiceException(errorMsg + response.getStatus());
}
String body = response.body();
Ys7ResponseVo responseVo = JSONUtil.toBean(body, Ys7ResponseVo.class);
if (!responseVo.getCode().equals("200")) {
log.error("{},状态码:{}{}", errorMsg, responseVo.getCode(), responseVo.getMsg());
// throw new ServiceException(errorMsg + responseVo.getMsg());
}
log.info("Ys7 Token 请求成功:{}", body);
}
}
}
} }

View File

@ -1,10 +1,8 @@
package org.dromara.bigscreen.controller; package org.dromara.bigscreen.controller;
import cn.dev33.satoken.annotation.SaCheckPermission;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import jakarta.annotation.Resource; import jakarta.annotation.Resource;
import jakarta.servlet.http.HttpServletRequest;
import org.dromara.bigscreen.domain.dto.WeatherQueryReq; import org.dromara.bigscreen.domain.dto.WeatherQueryReq;
import org.dromara.bigscreen.domain.vo.*; import org.dromara.bigscreen.domain.vo.*;
import org.dromara.bigscreen.mapper.ProjectBigScreenMapper; import org.dromara.bigscreen.mapper.ProjectBigScreenMapper;
@ -52,14 +50,10 @@ public class EnterpriseBigScreenController {
@Resource @Resource
private IBusProjectService projectService; private IBusProjectService projectService;
@Resource
private ProjectBigScreenMapper projectBigScreenMapper;
/** /**
* 获取关键指标 * 获取关键指标
*/ */
@SaCheckPermission("enterprise:bigScreen:keyIndex") // @SaCheckPermission("enterprise:bigScreen:keyIndex")
@GetMapping("/keyIndex") @GetMapping("/keyIndex")
public R<EnterpriseKeyIndexVo> getEnterpriseKeyIndex() { public R<EnterpriseKeyIndexVo> getEnterpriseKeyIndex() {
return R.ok(enterpriseBigScreenService.getEnterpriseKeyIndex()); return R.ok(enterpriseBigScreenService.getEnterpriseKeyIndex());
@ -68,7 +62,7 @@ public class EnterpriseBigScreenController {
/** /**
* 项目进度分析 * 项目进度分析
*/ */
@SaCheckPermission("enterprise:bigScreen:projectProgress") // @SaCheckPermission("enterprise:bigScreen:projectProgress")
@GetMapping("/projectProgress") @GetMapping("/projectProgress")
public R<ProjectProgressAnalysisVo> getProjectProgress() { public R<ProjectProgressAnalysisVo> getProjectProgress() {
return R.ok(enterpriseBigScreenService.getProjectProgressAnalysis()); return R.ok(enterpriseBigScreenService.getProjectProgressAnalysis());
@ -77,7 +71,7 @@ public class EnterpriseBigScreenController {
/** /**
* 项目产值对比 * 项目产值对比
*/ */
@SaCheckPermission("enterprise:bigScreen:projectOutputValueComparison") // @SaCheckPermission("enterprise:bigScreen:projectOutputValueComparison")
@GetMapping("/projectOutputValueComparison") @GetMapping("/projectOutputValueComparison")
public R<List<OutputValueComparisonVo>> getProjectOutputValueComparison() { public R<List<OutputValueComparisonVo>> getProjectOutputValueComparison() {
return R.ok(enterpriseBigScreenService.getProjectOutputValueComparison()); return R.ok(enterpriseBigScreenService.getProjectOutputValueComparison());
@ -86,7 +80,7 @@ public class EnterpriseBigScreenController {
/** /**
* 项目进度完成度和计划容量 * 项目进度完成度和计划容量
*/ */
@SaCheckPermission("enterprise:bigScreen:projectProgressCapacity") // @SaCheckPermission("enterprise:bigScreen:projectProgressCapacity")
@GetMapping("/projectProgressCapacity") @GetMapping("/projectProgressCapacity")
public R<List<ProjectProgressCapacityVo>> getProjectProgressCapacity() { public R<List<ProjectProgressCapacityVo>> getProjectProgressCapacity() {
return R.ok(enterpriseBigScreenService.getProjectProgressCapacity()); return R.ok(enterpriseBigScreenService.getProjectProgressCapacity());
@ -95,7 +89,7 @@ public class EnterpriseBigScreenController {
/** /**
* 风险预警 * 风险预警
*/ */
@SaCheckPermission("enterprise:bigScreen:riskEarlyWarning") // @SaCheckPermission("enterprise:bigScreen:riskEarlyWarning")
@GetMapping("/riskEarlyWarning") @GetMapping("/riskEarlyWarning")
public R<List<RiskEarlyWarningVo>> getRiskEarlyWarning() { public R<List<RiskEarlyWarningVo>> getRiskEarlyWarning() {
return R.ok(enterpriseBigScreenService.getRiskEarlyWarning()); return R.ok(enterpriseBigScreenService.getRiskEarlyWarning());
@ -104,7 +98,7 @@ public class EnterpriseBigScreenController {
/** /**
* 查询天气 * 查询天气
*/ */
@SaCheckPermission("enterprise:bigScreen:weather") // @SaCheckPermission("enterprise:bigScreen:weather")
@GetMapping("/weather") @GetMapping("/weather")
public R<List<WeatherVo>> getProjectWeather(WeatherQueryReq req) { public R<List<WeatherVo>> getProjectWeather(WeatherQueryReq req) {
return R.ok(enterpriseBigScreenService.getWeather3DaysList(req)); return R.ok(enterpriseBigScreenService.getWeather3DaysList(req));
@ -113,7 +107,7 @@ public class EnterpriseBigScreenController {
/** /**
* 查询安全天数 * 查询安全天数
*/ */
@SaCheckPermission("enterprise:bigScreen:safetyDay") // @SaCheckPermission("enterprise:bigScreen:safetyDay")
@GetMapping("/safetyDay") @GetMapping("/safetyDay")
public R<Long> getProjectSafetyDay() { public R<Long> getProjectSafetyDay() {
LocalDate date = LocalDate.of(2023, 1, 1); LocalDate date = LocalDate.of(2023, 1, 1);
@ -125,7 +119,7 @@ public class EnterpriseBigScreenController {
/** /**
* 人数统计 * 人数统计
*/ */
@SaCheckPermission("enterprise:bigScreen:peopleCount") // @SaCheckPermission("enterprise:bigScreen:peopleCount")
@GetMapping("/peopleCount") @GetMapping("/peopleCount")
public R<PeopleCountVo> getProjectPeopleCount() { public R<PeopleCountVo> getProjectPeopleCount() {
PeopleCountVo peopleCountVo = new PeopleCountVo(); PeopleCountVo peopleCountVo = new PeopleCountVo();
@ -156,7 +150,7 @@ public class EnterpriseBigScreenController {
/** /**
* 出勤人数统计 * 出勤人数统计
*/ */
@SaCheckPermission("enterprise:bigScreen:allAttendanceCount") // @SaCheckPermission("enterprise:bigScreen:allAttendanceCount")
@GetMapping("/allAttendanceCount") @GetMapping("/allAttendanceCount")
public R<TodayAttendanceCountVo> getAllAttendanceCount() { public R<TodayAttendanceCountVo> getAllAttendanceCount() {
TodayAttendanceCountVo todayAttendanceCountVo = new TodayAttendanceCountVo(); TodayAttendanceCountVo todayAttendanceCountVo = new TodayAttendanceCountVo();
@ -195,7 +189,7 @@ public class EnterpriseBigScreenController {
/** /**
* 每个项目的出勤人数 * 每个项目的出勤人数
*/ */
@SaCheckPermission("enterprise:bigScreen:projectAttendanceCount") // @SaCheckPermission("enterprise:bigScreen:projectAttendanceCount")
@GetMapping("/projectAttendanceCount") @GetMapping("/projectAttendanceCount")
public R<List<ProjectAttendanceCountVo>> getProjectAttendanceCount() { public R<List<ProjectAttendanceCountVo>> getProjectAttendanceCount() {

View File

@ -89,6 +89,7 @@ public class ProjectBigScreenController extends BaseController {
/** /**
* 查询项目土地统计 * 查询项目土地统计
*/ */
// @SaCheckPermission("project:big:screen")
@GetMapping("/{projectId}") @GetMapping("/{projectId}")
public R<List<ProjectLandVo>> landCount(@NotNull(message = "主键不能为空") public R<List<ProjectLandVo>> landCount(@NotNull(message = "主键不能为空")
@PathVariable Long projectId) { @PathVariable Long projectId) {
@ -160,7 +161,7 @@ public class ProjectBigScreenController extends BaseController {
/** /**
* 查询项目天气 * 查询项目天气
*/ */
@SaCheckPermission("project:bigScreen:weather") // @SaCheckPermission("project:big:screen")
@GetMapping("/weather/{projectId}") @GetMapping("/weather/{projectId}")
public R<List<WeatherVo>> getProjectWeather(@NotNull(message = "主键不能为空") public R<List<WeatherVo>> getProjectWeather(@NotNull(message = "主键不能为空")
@PathVariable Long projectId) { @PathVariable Long projectId) {
@ -170,7 +171,7 @@ public class ProjectBigScreenController extends BaseController {
/** /**
* 查询项目安全天数 * 查询项目安全天数
*/ */
@SaCheckPermission("project:bigScreen:safetyDay") // @SaCheckPermission("project:big:screen")
@GetMapping("/safetyDay/{projectId}") @GetMapping("/safetyDay/{projectId}")
public R<BusProjectSafetyDayVo> getProjectSafetyDay(@NotNull(message = "主键不能为空") public R<BusProjectSafetyDayVo> getProjectSafetyDay(@NotNull(message = "主键不能为空")
@PathVariable Long projectId) { @PathVariable Long projectId) {
@ -180,7 +181,7 @@ public class ProjectBigScreenController extends BaseController {
/** /**
* 查询项目公告 * 查询项目公告
*/ */
@SaCheckPermission("project:bigScreen:news") // @SaCheckPermission("project:big:screen")
@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) {
@ -198,7 +199,7 @@ public class ProjectBigScreenController extends BaseController {
/** /**
* 查询项目AI安全巡检 * 查询项目AI安全巡检
*/ */
@SaCheckPermission("project:bigScreen:safetyInspection") // @SaCheckPermission("project:big:screen")
@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) {
@ -225,7 +226,7 @@ public class ProjectBigScreenController extends BaseController {
/** /**
* 查询项目人员情况 * 查询项目人员情况
*/ */
@SaCheckPermission("project:bigScreen:people") // @SaCheckPermission("project:big:screen")
@GetMapping("/people/{projectId}") @GetMapping("/people/{projectId}")
public R<ProjectPeopleVo> getProjectPeople(@NotNull(message = "主键不能为空") public R<ProjectPeopleVo> getProjectPeople(@NotNull(message = "主键不能为空")
@PathVariable Long projectId) { @PathVariable Long projectId) {
@ -280,7 +281,7 @@ public class ProjectBigScreenController extends BaseController {
/** /**
* 查询项目形象进度 * 查询项目形象进度
*/ */
@SaCheckPermission("project:bigScreen:imageProgress") // @SaCheckPermission("project:big:screen")
@GetMapping("/imageProgress/{projectId}") @GetMapping("/imageProgress/{projectId}")
public R<List<ProjectImageProgressVo>> getProjectImageProgress(@NotNull(message = "主键不能为空") public R<List<ProjectImageProgressVo>> getProjectImageProgress(@NotNull(message = "主键不能为空")
@PathVariable Long projectId) { @PathVariable Long projectId) {
@ -290,7 +291,7 @@ public class ProjectBigScreenController extends BaseController {
/** /**
* 查询项目概括 * 查询项目概括
*/ */
@SaCheckPermission("project:bigScreen:generalize") // @SaCheckPermission("project:big:screen")
@GetMapping("/generalize/{projectId}") @GetMapping("/generalize/{projectId}")
public R<String> getProjectGeneralize(@NotNull(message = "主键不能为空") public R<String> getProjectGeneralize(@NotNull(message = "主键不能为空")
@PathVariable Long projectId) { @PathVariable Long projectId) {
@ -311,7 +312,7 @@ public class ProjectBigScreenController extends BaseController {
/** /**
* 查询设备列表 * 查询设备列表
*/ */
@SaCheckPermission("project:bigScreen:getClientList") // @SaCheckPermission("project:big:screen")
@GetMapping("/getClientList/{projectId}") @GetMapping("/getClientList/{projectId}")
public R<List<Map<String, Object>>> getClientList(@NotNull(message = "主键不能为空") public R<List<Map<String, Object>>> getClientList(@NotNull(message = "主键不能为空")
@PathVariable Long projectId) { @PathVariable Long projectId) {
@ -321,6 +322,7 @@ public class ProjectBigScreenController extends BaseController {
/** /**
* 修改萤石摄像头 * 修改萤石摄像头
*/ */
// @SaCheckPermission("project:big:screen")
@RepeatSubmit() @RepeatSubmit()
@PutMapping("/device") @PutMapping("/device")
public R<Void> edit(@Validated @RequestBody Ys7DeviceUpdateReq req) { public R<Void> edit(@Validated @RequestBody Ys7DeviceUpdateReq req) {
@ -356,6 +358,7 @@ public class ProjectBigScreenController extends BaseController {
/** /**
* 查询质量信息 * 查询质量信息
*/ */
// @SaCheckPermission("project:big:screen")
@GetMapping("/getQualityList/gis") @GetMapping("/getQualityList/gis")
public R<QltQualityInspectionListGisVo> queryGisList(QltQualityInspectionGisReq req) { public R<QltQualityInspectionListGisVo> queryGisList(QltQualityInspectionGisReq req) {
return R.ok(qualityInspectionService.queryGisList(req)); return R.ok(qualityInspectionService.queryGisList(req));
@ -364,6 +367,7 @@ public class ProjectBigScreenController extends BaseController {
/** /**
* 查询大屏安全信息 * 查询大屏安全信息
*/ */
// @SaCheckPermission("project:big:screen")
@GetMapping("/getSafetyList/gis") @GetMapping("/getSafetyList/gis")
public R<HseSafetyInspectionListGisVo> queryGisList(HseSafetyInspectionGisReq req) { public R<HseSafetyInspectionListGisVo> queryGisList(HseSafetyInspectionGisReq req) {
return R.ok(safetyInspectionService.queryGisList(req)); return R.ok(safetyInspectionService.queryGisList(req));
@ -372,7 +376,7 @@ public class ProjectBigScreenController extends BaseController {
/** /**
* 查询GPS设备用户列表 * 查询GPS设备用户列表
*/ */
@SaCheckPermission("project:bigScreen:getList") @SaCheckPermission("project:big:screen")
@GetMapping("/getList") @GetMapping("/getList")
public R<List<String>> getList(Long projectId) { public R<List<String>> getList(Long projectId) {
return R.ok(projectBigScreenService.getList(projectId)); return R.ok(projectBigScreenService.getList(projectId));
@ -381,7 +385,7 @@ public class ProjectBigScreenController extends BaseController {
/** /**
* 新增GPS设备详细 * 新增GPS设备详细
*/ */
@SaCheckPermission("project:bigScreen:setList") // @SaCheckPermission("project:big:screen")
@Log(title = "GPS设备详细", businessType = BusinessType.INSERT) @Log(title = "GPS设备详细", businessType = BusinessType.INSERT)
@RepeatSubmit() @RepeatSubmit()
@PostMapping("/setList") @PostMapping("/setList")
@ -392,7 +396,7 @@ public class ProjectBigScreenController extends BaseController {
/** /**
* 查询地图项目分类 * 查询地图项目分类
*/ */
// @SaCheckPermission("project:bigScreen:getProjectMapList") @SaCheckPermission("project:big:screen")
@GetMapping("/getProjectMapList") @GetMapping("/getProjectMapList")
public R<Map<String, Map<String, Map<String, String>>>> getProjectMapList() { public R<Map<String, Map<String, Map<String, String>>>> getProjectMapList() {
return R.ok(projectService.getProjectMapList()); return R.ok(projectService.getProjectMapList());
@ -402,7 +406,7 @@ public class ProjectBigScreenController extends BaseController {
/** /**
* 查询项目地域分散图 * 查询项目地域分散图
*/ */
// @SaCheckPermission("project:bigScreen:getProjectMapList") // @SaCheckPermission("project:big:screen")
@GetMapping("/getProjectDiYv") @GetMapping("/getProjectDiYv")
public R<Map<String, Long>> getProjectDiYv() { public R<Map<String, Long>> getProjectDiYv() {
return R.ok(projectService.getProjectDiYv()); return R.ok(projectService.getProjectDiYv());
@ -411,7 +415,7 @@ public class ProjectBigScreenController extends BaseController {
/** /**
* 计划和实际容量对比 * 计划和实际容量对比
*/ */
// @SaCheckPermission("project:bigScreen:getProjectMapList") // @SaCheckPermission("project:big:screen")
@GetMapping("/getProjectCapacity") @GetMapping("/getProjectCapacity")
public R<Map<String, Map<String, String>>> getProjectCapacity() { public R<Map<String, Map<String, String>>> getProjectCapacity() {
return R.ok(projectService.getProjectCapacity()); return R.ok(projectService.getProjectCapacity());
@ -421,6 +425,7 @@ public class ProjectBigScreenController extends BaseController {
/** /**
* 更新无人机缓存 * 更新无人机缓存
*/ */
// @SaCheckPermission("project:big:screen")
@GetMapping("/setWrjHc") @GetMapping("/setWrjHc")
public void setWrjHc(){ public void setWrjHc(){
projectBigScreenService.setWrjHc(); projectBigScreenService.setWrjHc();
@ -429,6 +434,7 @@ public class ProjectBigScreenController extends BaseController {
/** /**
* 更新无人机缓存 * 更新无人机缓存
*/ */
// @SaCheckPermission("project:big:screen")
@GetMapping("/getInfoData") @GetMapping("/getInfoData")
public R<Map<String, Map<String, Object>>> getInfoData(TanchuangInfoReq req){ public R<Map<String, Map<String, Object>>> getInfoData(TanchuangInfoReq req){
return R.ok(projectBigScreenService.getInfoData(req)); return R.ok(projectBigScreenService.getInfoData(req));

View File

@ -1,6 +1,7 @@
package org.dromara.facility.controller; package org.dromara.facility.controller;
import cn.dev33.satoken.annotation.SaCheckPermission; import cn.dev33.satoken.annotation.SaCheckPermission;
import cn.dev33.satoken.annotation.SaMode;
import jakarta.servlet.http.HttpServletResponse; import jakarta.servlet.http.HttpServletResponse;
import jakarta.validation.constraints.NotEmpty; import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull; import jakarta.validation.constraints.NotNull;
@ -41,7 +42,7 @@ public class FacRedLineController extends BaseController {
/** /**
* 查询设施-红线列表 * 查询设施-红线列表
*/ */
@SaCheckPermission("facility:redLine:list") @SaCheckPermission(value = {"facility:redLine:list", "project:big:screen"}, mode = SaMode.OR)
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo<FacRedLineVo> list(FacRedLineBo bo, PageQuery pageQuery) { public TableDataInfo<FacRedLineVo> list(FacRedLineBo bo, PageQuery pageQuery) {
return facRedLineService.queryPageList(bo, pageQuery); return facRedLineService.queryPageList(bo, pageQuery);

View File

@ -56,4 +56,9 @@ public interface Ys7Constant {
*/ */
String captureDeviceUrlByPost = "https://open.ys7.com/api/lapp/device/capture"; String captureDeviceUrlByPost = "https://open.ys7.com/api/lapp/device/capture";
/**
* 设置设备录像开关请求地址 Post
*/
String setDeviceVideoUrlByPost = "https://open.ys7.com/api/lapp/device/fullday/record/switch/set";
} }

View File

@ -17,7 +17,6 @@ import org.dromara.common.core.utils.StringUtils;
import org.dromara.common.json.utils.JsonUtils; import org.dromara.common.json.utils.JsonUtils;
import org.dromara.common.mybatis.core.page.PageQuery; import org.dromara.common.mybatis.core.page.PageQuery;
import org.dromara.common.mybatis.core.page.TableDataInfo; import org.dromara.common.mybatis.core.page.TableDataInfo;
import org.dromara.common.satoken.utils.LoginHelper;
import org.dromara.materials.domain.MatMaterialReceive; import org.dromara.materials.domain.MatMaterialReceive;
import org.dromara.materials.domain.MatMaterials; import org.dromara.materials.domain.MatMaterials;
import org.dromara.materials.domain.MatMaterialsInventory; import org.dromara.materials.domain.MatMaterialsInventory;
@ -651,7 +650,8 @@ public class MatMaterialsServiceImpl extends ServiceImpl<MatMaterialsMapper, Mat
List<MatMaterialsInventory> outList, List<MatMaterialsInventory> outList,
List<MatMaterialsUseRecord> useList) { List<MatMaterialsUseRecord> useList) {
Map<Long, MatMaterialsInventory> putMap = putList.stream() Map<Long, MatMaterialsInventory> putMap = putList.stream()
.collect(Collectors.toMap(MatMaterialsInventory::getMaterialsId, inventory -> inventory)); .collect(Collectors.toMap(MatMaterialsInventory::getMaterialsId, inventory -> inventory,
(existing, replacement) -> replacement));
return materials.stream().map(material -> { return materials.stream().map(material -> {
MatMaterialsUseDetailVo vo = new MatMaterialsUseDetailVo(); MatMaterialsUseDetailVo vo = new MatMaterialsUseDetailVo();
BeanUtils.copyProperties(material, vo); BeanUtils.copyProperties(material, vo);

View File

@ -104,7 +104,7 @@ public class MatMaterialsUseRecordServiceImpl extends ServiceImpl<MatMaterialsUs
); );
BigDecimal residueNumber; BigDecimal residueNumber;
if (lastRecord == null) { if (lastRecord == null) {
residueNumber = BigDecimal.valueOf(inventory.getResidue()); residueNumber = BigDecimal.valueOf(inventory.getNumber());
} else { } else {
residueNumber = lastRecord.getResidueNumber(); residueNumber = lastRecord.getResidueNumber();
} }
@ -117,13 +117,6 @@ public class MatMaterialsUseRecordServiceImpl extends ServiceImpl<MatMaterialsUs
if (!save) { if (!save) {
throw new ServiceException("保存材料使用登记失败", HttpStatus.ERROR); throw new ServiceException("保存材料使用登记失败", HttpStatus.ERROR);
} }
MatMaterialsInventory updateInventory = new MatMaterialsInventory();
updateInventory.setId(inventoryId);
updateInventory.setResidue(subtract.longValue());
boolean update = materialsInventoryService.updateById(updateInventory);
if (!update) {
throw new ServiceException("更新库存信息失败", HttpStatus.ERROR);
}
return true; return true;
} }

View File

@ -29,6 +29,6 @@ public class QltQualityInspectionListGisVo implements Serializable {
/** /**
* 巡检情况 * 巡检情况
*/ */
private String correctSituation; private Long correctSituation;
} }

View File

@ -180,7 +180,8 @@ public class QltQualityInspectionServiceImpl extends ServiceImpl<QltQualityInspe
.filter(q -> "2".equals(q.getIsReply())) .filter(q -> "2".equals(q.getIsReply()))
.toList() .toList()
.size()); .size());
gisVo.setCorrectSituation(String.format("%.2f", passCount * 100.0 / qualityInspectionList.size())); gisVo.setCorrectSituation(passCount);
// gisVo.setCorrectSituation(String.format("%.2f", passCount * 100.0 / qualityInspectionList.size()));
return gisVo; return gisVo;
} }

View File

@ -84,4 +84,10 @@ public class HseRecognizeRecordVo implements Serializable {
@ExcelProperty(value = "创建时间") @ExcelProperty(value = "创建时间")
private Date createTime; private Date createTime;
/**
* 备注
*/
@ExcelProperty(value = "备注")
private String remark;
} }

View File

@ -7,7 +7,6 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import jakarta.annotation.Resource; import jakarta.annotation.Resource;
import org.dromara.common.core.constant.HttpStatus; import org.dromara.common.core.constant.HttpStatus;
import org.dromara.common.core.exception.ServiceException; import org.dromara.common.core.exception.ServiceException;
import org.dromara.common.core.utils.ObjectUtils;
import org.dromara.common.core.utils.StringUtils; import org.dromara.common.core.utils.StringUtils;
import org.dromara.common.mybatis.core.page.PageQuery; import org.dromara.common.mybatis.core.page.PageQuery;
import org.dromara.common.mybatis.core.page.TableDataInfo; import org.dromara.common.mybatis.core.page.TableDataInfo;
@ -106,6 +105,7 @@ public class HseRecognizeRecordServiceImpl extends ServiceImpl<HseRecognizeRecor
entity.setDeviceName(record.getDeviceName()); entity.setDeviceName(record.getDeviceName());
entity.setRecordCategory(record.getRecordCategory()); entity.setRecordCategory(record.getRecordCategory());
entity.setPicture(record.getPicture()); entity.setPicture(record.getPicture());
entity.setProjectId(record.getProjectId());
entity.setCreateTime(record.getCreateTime()); entity.setCreateTime(record.getCreateTime());
Long projectId = record.getProjectId(); Long projectId = record.getProjectId();
if (projectId == null) { if (projectId == null) {
@ -191,7 +191,15 @@ public class HseRecognizeRecordServiceImpl extends ServiceImpl<HseRecognizeRecor
String violationType = req.getViolationType(); String violationType = req.getViolationType();
String description = req.getDescription(); String description = req.getDescription();
Date createTime = req.getCreateTime(); Date createTime = req.getCreateTime();
lqw.eq(ObjectUtils.isNotEmpty(projectId), HseRecognizeRecord::getProjectId, projectId); if (projectId != null) {
lqw.and(wrapper ->
wrapper.eq(HseRecognizeRecord::getProjectId, projectId)
.or()
.isNull(HseRecognizeRecord::getProjectId)
);
} else {
lqw.isNull(HseRecognizeRecord::getProjectId);
}
lqw.eq(StringUtils.isNotBlank(recordCategory), HseRecognizeRecord::getRecordCategory, recordCategory); lqw.eq(StringUtils.isNotBlank(recordCategory), HseRecognizeRecord::getRecordCategory, recordCategory);
lqw.eq(StringUtils.isNotBlank(violationType), HseRecognizeRecord::getViolationType, violationType); lqw.eq(StringUtils.isNotBlank(violationType), HseRecognizeRecord::getViolationType, violationType);
lqw.like(StringUtils.isNotBlank(description), HseRecognizeRecord::getDescription, description); lqw.like(StringUtils.isNotBlank(description), HseRecognizeRecord::getDescription, description);