大屏质量、物资、识别记录
This commit is contained in:
@ -3,6 +3,10 @@ package org.dromara.test;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.io.FileUtil;
|
||||
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.update.LambdaUpdateWrapper;
|
||||
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.IFacPhotovoltaicPanelService;
|
||||
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.OutConstructionValueRange;
|
||||
import org.dromara.out.service.IOutConstructionValueRangeService;
|
||||
@ -101,6 +110,12 @@ public class DemoTest {
|
||||
@Resource
|
||||
private IOutConstructionValueService constructionValueService;
|
||||
|
||||
@Resource
|
||||
private IOthYs7DeviceService ys7DeviceService;
|
||||
|
||||
@Resource
|
||||
private Ys7Manager ys7Manager;
|
||||
|
||||
|
||||
@Test
|
||||
void testConstructionValue() {
|
||||
@ -114,7 +129,7 @@ public class DemoTest {
|
||||
log.info("执行定时任务:同步 {}至{} 计划详情到施工产值", lastMonday, lastSunday);
|
||||
Boolean synced = progressPlanDetailService.syncPlanDetail2ConstructionValue(lastMonday, lastSunday, null);*/
|
||||
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) {
|
||||
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -1,10 +1,8 @@
|
||||
package org.dromara.bigscreen.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import org.dromara.bigscreen.domain.dto.WeatherQueryReq;
|
||||
import org.dromara.bigscreen.domain.vo.*;
|
||||
import org.dromara.bigscreen.mapper.ProjectBigScreenMapper;
|
||||
@ -52,14 +50,10 @@ public class EnterpriseBigScreenController {
|
||||
@Resource
|
||||
private IBusProjectService projectService;
|
||||
|
||||
@Resource
|
||||
private ProjectBigScreenMapper projectBigScreenMapper;
|
||||
|
||||
|
||||
/**
|
||||
* 获取关键指标
|
||||
*/
|
||||
@SaCheckPermission("enterprise:bigScreen:keyIndex")
|
||||
// @SaCheckPermission("enterprise:bigScreen:keyIndex")
|
||||
@GetMapping("/keyIndex")
|
||||
public R<EnterpriseKeyIndexVo> getEnterpriseKeyIndex() {
|
||||
return R.ok(enterpriseBigScreenService.getEnterpriseKeyIndex());
|
||||
@ -68,7 +62,7 @@ public class EnterpriseBigScreenController {
|
||||
/**
|
||||
* 项目进度分析
|
||||
*/
|
||||
@SaCheckPermission("enterprise:bigScreen:projectProgress")
|
||||
// @SaCheckPermission("enterprise:bigScreen:projectProgress")
|
||||
@GetMapping("/projectProgress")
|
||||
public R<ProjectProgressAnalysisVo> getProjectProgress() {
|
||||
return R.ok(enterpriseBigScreenService.getProjectProgressAnalysis());
|
||||
@ -77,7 +71,7 @@ public class EnterpriseBigScreenController {
|
||||
/**
|
||||
* 项目产值对比
|
||||
*/
|
||||
@SaCheckPermission("enterprise:bigScreen:projectOutputValueComparison")
|
||||
// @SaCheckPermission("enterprise:bigScreen:projectOutputValueComparison")
|
||||
@GetMapping("/projectOutputValueComparison")
|
||||
public R<List<OutputValueComparisonVo>> getProjectOutputValueComparison() {
|
||||
return R.ok(enterpriseBigScreenService.getProjectOutputValueComparison());
|
||||
@ -86,7 +80,7 @@ public class EnterpriseBigScreenController {
|
||||
/**
|
||||
* 项目进度完成度和计划容量
|
||||
*/
|
||||
@SaCheckPermission("enterprise:bigScreen:projectProgressCapacity")
|
||||
// @SaCheckPermission("enterprise:bigScreen:projectProgressCapacity")
|
||||
@GetMapping("/projectProgressCapacity")
|
||||
public R<List<ProjectProgressCapacityVo>> getProjectProgressCapacity() {
|
||||
return R.ok(enterpriseBigScreenService.getProjectProgressCapacity());
|
||||
@ -95,7 +89,7 @@ public class EnterpriseBigScreenController {
|
||||
/**
|
||||
* 风险预警
|
||||
*/
|
||||
@SaCheckPermission("enterprise:bigScreen:riskEarlyWarning")
|
||||
// @SaCheckPermission("enterprise:bigScreen:riskEarlyWarning")
|
||||
@GetMapping("/riskEarlyWarning")
|
||||
public R<List<RiskEarlyWarningVo>> getRiskEarlyWarning() {
|
||||
return R.ok(enterpriseBigScreenService.getRiskEarlyWarning());
|
||||
@ -104,7 +98,7 @@ public class EnterpriseBigScreenController {
|
||||
/**
|
||||
* 查询天气
|
||||
*/
|
||||
@SaCheckPermission("enterprise:bigScreen:weather")
|
||||
// @SaCheckPermission("enterprise:bigScreen:weather")
|
||||
@GetMapping("/weather")
|
||||
public R<List<WeatherVo>> getProjectWeather(WeatherQueryReq req) {
|
||||
return R.ok(enterpriseBigScreenService.getWeather3DaysList(req));
|
||||
@ -113,7 +107,7 @@ public class EnterpriseBigScreenController {
|
||||
/**
|
||||
* 查询安全天数
|
||||
*/
|
||||
@SaCheckPermission("enterprise:bigScreen:safetyDay")
|
||||
// @SaCheckPermission("enterprise:bigScreen:safetyDay")
|
||||
@GetMapping("/safetyDay")
|
||||
public R<Long> getProjectSafetyDay() {
|
||||
LocalDate date = LocalDate.of(2023, 1, 1);
|
||||
@ -125,7 +119,7 @@ public class EnterpriseBigScreenController {
|
||||
/**
|
||||
* 人数统计
|
||||
*/
|
||||
@SaCheckPermission("enterprise:bigScreen:peopleCount")
|
||||
// @SaCheckPermission("enterprise:bigScreen:peopleCount")
|
||||
@GetMapping("/peopleCount")
|
||||
public R<PeopleCountVo> getProjectPeopleCount() {
|
||||
PeopleCountVo peopleCountVo = new PeopleCountVo();
|
||||
@ -156,7 +150,7 @@ public class EnterpriseBigScreenController {
|
||||
/**
|
||||
* 出勤人数统计
|
||||
*/
|
||||
@SaCheckPermission("enterprise:bigScreen:allAttendanceCount")
|
||||
// @SaCheckPermission("enterprise:bigScreen:allAttendanceCount")
|
||||
@GetMapping("/allAttendanceCount")
|
||||
public R<TodayAttendanceCountVo> getAllAttendanceCount() {
|
||||
TodayAttendanceCountVo todayAttendanceCountVo = new TodayAttendanceCountVo();
|
||||
@ -195,7 +189,7 @@ public class EnterpriseBigScreenController {
|
||||
/**
|
||||
* 每个项目的出勤人数
|
||||
*/
|
||||
@SaCheckPermission("enterprise:bigScreen:projectAttendanceCount")
|
||||
// @SaCheckPermission("enterprise:bigScreen:projectAttendanceCount")
|
||||
@GetMapping("/projectAttendanceCount")
|
||||
public R<List<ProjectAttendanceCountVo>> getProjectAttendanceCount() {
|
||||
|
||||
|
||||
@ -89,6 +89,7 @@ public class ProjectBigScreenController extends BaseController {
|
||||
/**
|
||||
* 查询项目土地统计
|
||||
*/
|
||||
// @SaCheckPermission("project:big:screen")
|
||||
@GetMapping("/{projectId}")
|
||||
public R<List<ProjectLandVo>> landCount(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long projectId) {
|
||||
@ -160,7 +161,7 @@ public class ProjectBigScreenController extends BaseController {
|
||||
/**
|
||||
* 查询项目天气
|
||||
*/
|
||||
@SaCheckPermission("project:bigScreen:weather")
|
||||
// @SaCheckPermission("project:big:screen")
|
||||
@GetMapping("/weather/{projectId}")
|
||||
public R<List<WeatherVo>> getProjectWeather(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long projectId) {
|
||||
@ -170,7 +171,7 @@ public class ProjectBigScreenController extends BaseController {
|
||||
/**
|
||||
* 查询项目安全天数
|
||||
*/
|
||||
@SaCheckPermission("project:bigScreen:safetyDay")
|
||||
// @SaCheckPermission("project:big:screen")
|
||||
@GetMapping("/safetyDay/{projectId}")
|
||||
public R<BusProjectSafetyDayVo> getProjectSafetyDay(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long projectId) {
|
||||
@ -180,7 +181,7 @@ public class ProjectBigScreenController extends BaseController {
|
||||
/**
|
||||
* 查询项目公告
|
||||
*/
|
||||
@SaCheckPermission("project:bigScreen:news")
|
||||
// @SaCheckPermission("project:big:screen")
|
||||
@GetMapping("/news/{projectId}")
|
||||
public R<List<BusProjectNewsVo>> getProjectNews(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long projectId) {
|
||||
@ -198,7 +199,7 @@ public class ProjectBigScreenController extends BaseController {
|
||||
/**
|
||||
* 查询项目AI安全巡检
|
||||
*/
|
||||
@SaCheckPermission("project:bigScreen:safetyInspection")
|
||||
// @SaCheckPermission("project:big:screen")
|
||||
@GetMapping("/safetyInspection/{projectId}")
|
||||
public R<List<ProjectSafetyInspectionVo>> getProjectSafetyInspection(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long projectId) {
|
||||
@ -225,7 +226,7 @@ public class ProjectBigScreenController extends BaseController {
|
||||
/**
|
||||
* 查询项目人员情况
|
||||
*/
|
||||
@SaCheckPermission("project:bigScreen:people")
|
||||
// @SaCheckPermission("project:big:screen")
|
||||
@GetMapping("/people/{projectId}")
|
||||
public R<ProjectPeopleVo> getProjectPeople(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long projectId) {
|
||||
@ -280,7 +281,7 @@ public class ProjectBigScreenController extends BaseController {
|
||||
/**
|
||||
* 查询项目形象进度
|
||||
*/
|
||||
@SaCheckPermission("project:bigScreen:imageProgress")
|
||||
// @SaCheckPermission("project:big:screen")
|
||||
@GetMapping("/imageProgress/{projectId}")
|
||||
public R<List<ProjectImageProgressVo>> getProjectImageProgress(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long projectId) {
|
||||
@ -290,7 +291,7 @@ public class ProjectBigScreenController extends BaseController {
|
||||
/**
|
||||
* 查询项目概括
|
||||
*/
|
||||
@SaCheckPermission("project:bigScreen:generalize")
|
||||
// @SaCheckPermission("project:big:screen")
|
||||
@GetMapping("/generalize/{projectId}")
|
||||
public R<String> getProjectGeneralize(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long projectId) {
|
||||
@ -311,7 +312,7 @@ public class ProjectBigScreenController extends BaseController {
|
||||
/**
|
||||
* 查询设备列表
|
||||
*/
|
||||
@SaCheckPermission("project:bigScreen:getClientList")
|
||||
// @SaCheckPermission("project:big:screen")
|
||||
@GetMapping("/getClientList/{projectId}")
|
||||
public R<List<Map<String, Object>>> getClientList(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long projectId) {
|
||||
@ -321,6 +322,7 @@ public class ProjectBigScreenController extends BaseController {
|
||||
/**
|
||||
* 修改萤石摄像头
|
||||
*/
|
||||
// @SaCheckPermission("project:big:screen")
|
||||
@RepeatSubmit()
|
||||
@PutMapping("/device")
|
||||
public R<Void> edit(@Validated @RequestBody Ys7DeviceUpdateReq req) {
|
||||
@ -356,6 +358,7 @@ public class ProjectBigScreenController extends BaseController {
|
||||
/**
|
||||
* 查询质量信息
|
||||
*/
|
||||
// @SaCheckPermission("project:big:screen")
|
||||
@GetMapping("/getQualityList/gis")
|
||||
public R<QltQualityInspectionListGisVo> queryGisList(QltQualityInspectionGisReq req) {
|
||||
return R.ok(qualityInspectionService.queryGisList(req));
|
||||
@ -364,6 +367,7 @@ public class ProjectBigScreenController extends BaseController {
|
||||
/**
|
||||
* 查询大屏安全信息
|
||||
*/
|
||||
// @SaCheckPermission("project:big:screen")
|
||||
@GetMapping("/getSafetyList/gis")
|
||||
public R<HseSafetyInspectionListGisVo> queryGisList(HseSafetyInspectionGisReq req) {
|
||||
return R.ok(safetyInspectionService.queryGisList(req));
|
||||
@ -372,7 +376,7 @@ public class ProjectBigScreenController extends BaseController {
|
||||
/**
|
||||
* 查询GPS设备用户列表
|
||||
*/
|
||||
@SaCheckPermission("project:bigScreen:getList")
|
||||
@SaCheckPermission("project:big:screen")
|
||||
@GetMapping("/getList")
|
||||
public R<List<String>> getList(Long projectId) {
|
||||
return R.ok(projectBigScreenService.getList(projectId));
|
||||
@ -381,7 +385,7 @@ public class ProjectBigScreenController extends BaseController {
|
||||
/**
|
||||
* 新增GPS设备详细
|
||||
*/
|
||||
@SaCheckPermission("project:bigScreen:setList")
|
||||
// @SaCheckPermission("project:big:screen")
|
||||
@Log(title = "GPS设备详细", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping("/setList")
|
||||
@ -392,7 +396,7 @@ public class ProjectBigScreenController extends BaseController {
|
||||
/**
|
||||
* 查询地图项目分类
|
||||
*/
|
||||
// @SaCheckPermission("project:bigScreen:getProjectMapList")
|
||||
@SaCheckPermission("project:big:screen")
|
||||
@GetMapping("/getProjectMapList")
|
||||
public R<Map<String, Map<String, Map<String, String>>>> 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")
|
||||
public R<Map<String, Long>> 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")
|
||||
public R<Map<String, Map<String, String>>> getProjectCapacity() {
|
||||
return R.ok(projectService.getProjectCapacity());
|
||||
@ -421,6 +425,7 @@ public class ProjectBigScreenController extends BaseController {
|
||||
/**
|
||||
* 更新无人机缓存
|
||||
*/
|
||||
// @SaCheckPermission("project:big:screen")
|
||||
@GetMapping("/setWrjHc")
|
||||
public void setWrjHc(){
|
||||
projectBigScreenService.setWrjHc();
|
||||
@ -429,6 +434,7 @@ public class ProjectBigScreenController extends BaseController {
|
||||
/**
|
||||
* 更新无人机缓存
|
||||
*/
|
||||
// @SaCheckPermission("project:big:screen")
|
||||
@GetMapping("/getInfoData")
|
||||
public R<Map<String, Map<String, Object>>> getInfoData(TanchuangInfoReq req){
|
||||
return R.ok(projectBigScreenService.getInfoData(req));
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
package org.dromara.facility.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.dev33.satoken.annotation.SaMode;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
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")
|
||||
public TableDataInfo<FacRedLineVo> list(FacRedLineBo bo, PageQuery pageQuery) {
|
||||
return facRedLineService.queryPageList(bo, pageQuery);
|
||||
|
||||
@ -56,4 +56,9 @@ public interface Ys7Constant {
|
||||
*/
|
||||
String captureDeviceUrlByPost = "https://open.ys7.com/api/lapp/device/capture";
|
||||
|
||||
/**
|
||||
* 设置设备录像开关请求地址 Post
|
||||
*/
|
||||
String setDeviceVideoUrlByPost = "https://open.ys7.com/api/lapp/device/fullday/record/switch/set";
|
||||
|
||||
}
|
||||
|
||||
@ -17,7 +17,6 @@ import org.dromara.common.core.utils.StringUtils;
|
||||
import org.dromara.common.json.utils.JsonUtils;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
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.MatMaterials;
|
||||
import org.dromara.materials.domain.MatMaterialsInventory;
|
||||
@ -651,7 +650,8 @@ public class MatMaterialsServiceImpl extends ServiceImpl<MatMaterialsMapper, Mat
|
||||
List<MatMaterialsInventory> outList,
|
||||
List<MatMaterialsUseRecord> useList) {
|
||||
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 -> {
|
||||
MatMaterialsUseDetailVo vo = new MatMaterialsUseDetailVo();
|
||||
BeanUtils.copyProperties(material, vo);
|
||||
|
||||
@ -104,7 +104,7 @@ public class MatMaterialsUseRecordServiceImpl extends ServiceImpl<MatMaterialsUs
|
||||
);
|
||||
BigDecimal residueNumber;
|
||||
if (lastRecord == null) {
|
||||
residueNumber = BigDecimal.valueOf(inventory.getResidue());
|
||||
residueNumber = BigDecimal.valueOf(inventory.getNumber());
|
||||
} else {
|
||||
residueNumber = lastRecord.getResidueNumber();
|
||||
}
|
||||
@ -117,13 +117,6 @@ public class MatMaterialsUseRecordServiceImpl extends ServiceImpl<MatMaterialsUs
|
||||
if (!save) {
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
@ -29,6 +29,6 @@ public class QltQualityInspectionListGisVo implements Serializable {
|
||||
/**
|
||||
* 巡检情况
|
||||
*/
|
||||
private String correctSituation;
|
||||
private Long correctSituation;
|
||||
|
||||
}
|
||||
|
||||
@ -180,7 +180,8 @@ public class QltQualityInspectionServiceImpl extends ServiceImpl<QltQualityInspe
|
||||
.filter(q -> "2".equals(q.getIsReply()))
|
||||
.toList()
|
||||
.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;
|
||||
}
|
||||
|
||||
|
||||
@ -84,4 +84,10 @@ public class HseRecognizeRecordVo implements Serializable {
|
||||
@ExcelProperty(value = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
|
||||
@ -7,7 +7,6 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.dromara.common.core.constant.HttpStatus;
|
||||
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.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
@ -106,6 +105,7 @@ public class HseRecognizeRecordServiceImpl extends ServiceImpl<HseRecognizeRecor
|
||||
entity.setDeviceName(record.getDeviceName());
|
||||
entity.setRecordCategory(record.getRecordCategory());
|
||||
entity.setPicture(record.getPicture());
|
||||
entity.setProjectId(record.getProjectId());
|
||||
entity.setCreateTime(record.getCreateTime());
|
||||
Long projectId = record.getProjectId();
|
||||
if (projectId == null) {
|
||||
@ -191,7 +191,15 @@ public class HseRecognizeRecordServiceImpl extends ServiceImpl<HseRecognizeRecor
|
||||
String violationType = req.getViolationType();
|
||||
String description = req.getDescription();
|
||||
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(violationType), HseRecognizeRecord::getViolationType, violationType);
|
||||
lqw.like(StringUtils.isNotBlank(description), HseRecognizeRecord::getDescription, description);
|
||||
|
||||
Reference in New Issue
Block a user