修改bug
This commit is contained in:
@ -18,6 +18,7 @@ import org.dromara.facility.service.IFacMatrixService;
|
|||||||
import org.dromara.facility.service.IFacPhotovoltaicPanelPartsService;
|
import org.dromara.facility.service.IFacPhotovoltaicPanelPartsService;
|
||||||
import org.dromara.progress.service.IPgsProgressCategoryService;
|
import org.dromara.progress.service.IPgsProgressCategoryService;
|
||||||
import org.dromara.progress.service.IPgsProgressCategoryTemplateService;
|
import org.dromara.progress.service.IPgsProgressCategoryTemplateService;
|
||||||
|
import org.dromara.progress.service.IPgsProgressPlanDetailService;
|
||||||
import org.dromara.project.service.IBusProjectService;
|
import org.dromara.project.service.IBusProjectService;
|
||||||
import org.dromara.system.service.ISysDeptService;
|
import org.dromara.system.service.ISysDeptService;
|
||||||
import org.dromara.tender.service.impl.TenderSupplierInputServiceImpl;
|
import org.dromara.tender.service.impl.TenderSupplierInputServiceImpl;
|
||||||
@ -46,6 +47,9 @@ public class DemoTest {
|
|||||||
@Resource
|
@Resource
|
||||||
private IPgsProgressCategoryTemplateService progressCategoryTemplateService;
|
private IPgsProgressCategoryTemplateService progressCategoryTemplateService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private IPgsProgressPlanDetailService progressPlanDetailService;
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private IFacMatrixService matrixService;
|
private IFacMatrixService matrixService;
|
||||||
|
|
||||||
@ -69,6 +73,11 @@ public class DemoTest {
|
|||||||
@Resource
|
@Resource
|
||||||
private IdCardEncryptorUtil idCardEncryptorUtil;
|
private IdCardEncryptorUtil idCardEncryptorUtil;
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void testConstructionValue() {
|
||||||
|
progressPlanDetailService.syncPlanDetail2ConstructionValue(LocalDate.now().minusDays(1), null);
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void setIdCardEncryptorUtil() {
|
void setIdCardEncryptorUtil() {
|
||||||
List<SubConstructionUser> list = constructionUserService.list();
|
List<SubConstructionUser> list = constructionUserService.list();
|
||||||
|
|||||||
@ -27,4 +27,9 @@ public class FacFacilityPositionGisReq implements Serializable {
|
|||||||
* 方阵id列表
|
* 方阵id列表
|
||||||
*/
|
*/
|
||||||
private List<Long> matrixIdList;
|
private List<Long> matrixIdList;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 类型
|
||||||
|
*/
|
||||||
|
private List<String> typeList;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -12,7 +12,6 @@ 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;
|
||||||
import org.dromara.common.satoken.utils.LoginHelper;
|
|
||||||
import org.dromara.common.utils.JSTUtil;
|
import org.dromara.common.utils.JSTUtil;
|
||||||
import org.dromara.facility.constant.FacRedisKeyConstant;
|
import org.dromara.facility.constant.FacRedisKeyConstant;
|
||||||
import org.dromara.facility.domain.*;
|
import org.dromara.facility.domain.*;
|
||||||
@ -296,8 +295,11 @@ public class FacMatrixServiceImpl extends ServiceImpl<FacMatrixMapper, FacMatrix
|
|||||||
List<List<Double>> coordinatesList = JSTUtil.getTwoDimensionalCoordinates(geometry);
|
List<List<Double>> coordinatesList = JSTUtil.getTwoDimensionalCoordinates(geometry);
|
||||||
// 获取方阵名称
|
// 获取方阵名称
|
||||||
String nameStr = JSTUtil.findNearestPointText(coordinatesList, nameFeatures);
|
String nameStr = JSTUtil.findNearestPointText(coordinatesList, nameFeatures);
|
||||||
|
if (StringUtils.isBlank(nameStr)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
String name = nameStr.split(" ")[0];
|
String name = nameStr.split(" ")[0];
|
||||||
if (name == null) {
|
if (StringUtils.isBlank(name)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
// 将位置信息转换为 JSON 字符串
|
// 将位置信息转换为 JSON 字符串
|
||||||
@ -563,6 +565,7 @@ public class FacMatrixServiceImpl extends ServiceImpl<FacMatrixMapper, FacMatrix
|
|||||||
public List<FacFacilityPositionGisVo> getPositionGis(FacFacilityPositionGisReq req) {
|
public List<FacFacilityPositionGisVo> getPositionGis(FacFacilityPositionGisReq req) {
|
||||||
Long projectId = req.getProjectId();
|
Long projectId = req.getProjectId();
|
||||||
List<Long> matrixIdList = req.getMatrixIdList();
|
List<Long> matrixIdList = req.getMatrixIdList();
|
||||||
|
List<String> typeList = req.getTypeList();
|
||||||
BusProject project = projectService.getById(projectId);
|
BusProject project = projectService.getById(projectId);
|
||||||
if (project == null) {
|
if (project == null) {
|
||||||
throw new ServiceException("项目信息不存在", HttpStatus.NOT_FOUND);
|
throw new ServiceException("项目信息不存在", HttpStatus.NOT_FOUND);
|
||||||
@ -575,6 +578,7 @@ public class FacMatrixServiceImpl extends ServiceImpl<FacMatrixMapper, FacMatrix
|
|||||||
if (CollUtil.isEmpty(matrixList)) {
|
if (CollUtil.isEmpty(matrixList)) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
if (CollUtil.isEmpty(typeList) || typeList.contains("1")) {
|
||||||
List<FacFacilityPositionGisVo> matrixVoList = matrixList.stream().map(obj ->
|
List<FacFacilityPositionGisVo> matrixVoList = matrixList.stream().map(obj ->
|
||||||
FacFacilityPositionGisVo.obj2vo(
|
FacFacilityPositionGisVo.obj2vo(
|
||||||
obj.getId(),
|
obj.getId(),
|
||||||
@ -585,7 +589,9 @@ public class FacMatrixServiceImpl extends ServiceImpl<FacMatrixMapper, FacMatrix
|
|||||||
))
|
))
|
||||||
.toList();
|
.toList();
|
||||||
result.addAll(matrixVoList);
|
result.addAll(matrixVoList);
|
||||||
|
}
|
||||||
// 获取光伏板立柱信息
|
// 获取光伏板立柱信息
|
||||||
|
if (CollUtil.isEmpty(typeList) || typeList.contains("2")) {
|
||||||
List<FacPhotovoltaicPanelColumn> columnList = photovoltaicPanelColumnService.lambdaQuery()
|
List<FacPhotovoltaicPanelColumn> columnList = photovoltaicPanelColumnService.lambdaQuery()
|
||||||
.select(
|
.select(
|
||||||
FacPhotovoltaicPanelColumn::getId,
|
FacPhotovoltaicPanelColumn::getId,
|
||||||
@ -606,7 +612,9 @@ public class FacMatrixServiceImpl extends ServiceImpl<FacMatrixMapper, FacMatrix
|
|||||||
))
|
))
|
||||||
.toList();
|
.toList();
|
||||||
result.addAll(columnVoList);
|
result.addAll(columnVoList);
|
||||||
|
}
|
||||||
// 获取光伏板点信息
|
// 获取光伏板点信息
|
||||||
|
if (CollUtil.isEmpty(typeList) || typeList.contains("3")) {
|
||||||
List<FacPhotovoltaicPanelPoint> pointList = photovoltaicPanelPointService.lambdaQuery()
|
List<FacPhotovoltaicPanelPoint> pointList = photovoltaicPanelPointService.lambdaQuery()
|
||||||
.select(
|
.select(
|
||||||
FacPhotovoltaicPanelPoint::getId,
|
FacPhotovoltaicPanelPoint::getId,
|
||||||
@ -627,7 +635,9 @@ public class FacMatrixServiceImpl extends ServiceImpl<FacMatrixMapper, FacMatrix
|
|||||||
))
|
))
|
||||||
.toList();
|
.toList();
|
||||||
result.addAll(pointVoList);
|
result.addAll(pointVoList);
|
||||||
|
}
|
||||||
// 获取光伏板支架信息
|
// 获取光伏板支架信息
|
||||||
|
if (CollUtil.isEmpty(typeList) || typeList.contains("4")) {
|
||||||
List<FacPhotovoltaicPanelSupport> supportList = photovoltaicPanelSupportService.lambdaQuery()
|
List<FacPhotovoltaicPanelSupport> supportList = photovoltaicPanelSupportService.lambdaQuery()
|
||||||
.select(
|
.select(
|
||||||
FacPhotovoltaicPanelSupport::getId,
|
FacPhotovoltaicPanelSupport::getId,
|
||||||
@ -648,7 +658,9 @@ public class FacMatrixServiceImpl extends ServiceImpl<FacMatrixMapper, FacMatrix
|
|||||||
))
|
))
|
||||||
.toList();
|
.toList();
|
||||||
result.addAll(supporVotList);
|
result.addAll(supporVotList);
|
||||||
|
}
|
||||||
// 获取光伏板信息
|
// 获取光伏板信息
|
||||||
|
if (CollUtil.isEmpty(typeList) || typeList.contains("5")) {
|
||||||
List<FacPhotovoltaicPanel> panelList = photovoltaicPanelService.lambdaQuery()
|
List<FacPhotovoltaicPanel> panelList = photovoltaicPanelService.lambdaQuery()
|
||||||
.select(
|
.select(
|
||||||
FacPhotovoltaicPanel::getId,
|
FacPhotovoltaicPanel::getId,
|
||||||
@ -670,7 +682,9 @@ public class FacMatrixServiceImpl extends ServiceImpl<FacMatrixMapper, FacMatrix
|
|||||||
))
|
))
|
||||||
.toList();
|
.toList();
|
||||||
result.addAll(panelVoList);
|
result.addAll(panelVoList);
|
||||||
|
}
|
||||||
// 获取箱变信息
|
// 获取箱变信息
|
||||||
|
if (CollUtil.isEmpty(typeList) || typeList.contains("6")) {
|
||||||
List<FacBoxTransformer> boxTransformerList = boxTransformerService.lambdaQuery()
|
List<FacBoxTransformer> boxTransformerList = boxTransformerService.lambdaQuery()
|
||||||
.select(
|
.select(
|
||||||
FacBoxTransformer::getId,
|
FacBoxTransformer::getId,
|
||||||
@ -692,7 +706,9 @@ public class FacMatrixServiceImpl extends ServiceImpl<FacMatrixMapper, FacMatrix
|
|||||||
))
|
))
|
||||||
.toList();
|
.toList();
|
||||||
result.addAll(boxTransformerVoList);
|
result.addAll(boxTransformerVoList);
|
||||||
|
}
|
||||||
// 获取逆变器信息
|
// 获取逆变器信息
|
||||||
|
if (CollUtil.isEmpty(typeList) || typeList.contains("7")) {
|
||||||
List<FacInverter> inverterList = inverterService.lambdaQuery()
|
List<FacInverter> inverterList = inverterService.lambdaQuery()
|
||||||
.select(
|
.select(
|
||||||
FacInverter::getId,
|
FacInverter::getId,
|
||||||
@ -714,6 +730,7 @@ public class FacMatrixServiceImpl extends ServiceImpl<FacMatrixMapper, FacMatrix
|
|||||||
))
|
))
|
||||||
.toList();
|
.toList();
|
||||||
result.addAll(inverterVoList);
|
result.addAll(inverterVoList);
|
||||||
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -201,7 +201,7 @@ public class FacPhotovoltaicPanelServiceImpl extends ServiceImpl<FacPhotovoltaic
|
|||||||
}
|
}
|
||||||
// 获取项目下方阵信息
|
// 获取项目下方阵信息
|
||||||
List<FacMatrix> matrixList = matrixService.lambdaQuery()
|
List<FacMatrix> matrixList = matrixService.lambdaQuery()
|
||||||
.select(FacMatrix::getId, FacMatrix::getPositions)
|
.select(FacMatrix::getId, FacMatrix::getPositions, FacMatrix::getMatrixName)
|
||||||
.eq(FacMatrix::getProjectId, projectId).list();
|
.eq(FacMatrix::getProjectId, projectId).list();
|
||||||
if (CollUtil.isEmpty(matrixList)) {
|
if (CollUtil.isEmpty(matrixList)) {
|
||||||
throw new ServiceException("项目下无方阵数据,请先创建方阵信息后再添加光伏板信息", HttpStatus.NOT_FOUND);
|
throw new ServiceException("项目下无方阵数据,请先创建方阵信息后再添加光伏板信息", HttpStatus.NOT_FOUND);
|
||||||
@ -292,7 +292,10 @@ public class FacPhotovoltaicPanelServiceImpl extends ServiceImpl<FacPhotovoltaic
|
|||||||
FacProperties nameProperties = nameFeature.getProperties();
|
FacProperties nameProperties = nameFeature.getProperties();
|
||||||
String name = nameProperties.getText();
|
String name = nameProperties.getText();
|
||||||
// ① 获取名称
|
// ① 获取名称
|
||||||
if (StringUtils.isBlank(name)) return Collections.emptyList();
|
if (StringUtils.isBlank(name)) {
|
||||||
|
log.info("名称为空,跳过");
|
||||||
|
return Collections.emptyList();
|
||||||
|
}
|
||||||
// if (!name.startsWith("G")) return Collections.emptyList();
|
// if (!name.startsWith("G")) return Collections.emptyList();
|
||||||
List<FacPhotovoltaicPanel> panelList = new ArrayList<>();
|
List<FacPhotovoltaicPanel> panelList = new ArrayList<>();
|
||||||
// ② 找到该点对应的 polygon(优先包含,否则最近)
|
// ② 找到该点对应的 polygon(优先包含,否则最近)
|
||||||
@ -301,8 +304,33 @@ public class FacPhotovoltaicPanelServiceImpl extends ServiceImpl<FacPhotovoltaic
|
|||||||
// ③ 获取 geometry 坐标
|
// ③ 获取 geometry 坐标
|
||||||
List<List<Double>> coordinates = matchedPolygon.getGeometry().getCoordinates().getFirst();
|
List<List<Double>> coordinates = matchedPolygon.getGeometry().getCoordinates().getFirst();
|
||||||
// ④ 判断所属方阵
|
// ④ 判断所属方阵
|
||||||
FacMatrix matrix = matrixService.getMatrixIdBy2Coordinates(matrixList, coordinates);
|
/* FacMatrix matrix = matrixService.getMatrixIdBy2Coordinates(matrixList, coordinates);
|
||||||
if (matrix == null) return Collections.emptyList();
|
if (matrix == null) {
|
||||||
|
log.info("所属方阵为空,跳过");
|
||||||
|
return Collections.emptyList();
|
||||||
|
}
|
||||||
|
Long matrixId = matrix.getId();*/
|
||||||
|
// 去掉首字母 (T/G)
|
||||||
|
String withoutPrefix = name.substring(1);
|
||||||
|
|
||||||
|
// 如果包含".",只取第一个"."前的数字
|
||||||
|
int dotIndex = withoutPrefix.indexOf(".");
|
||||||
|
if (dotIndex != -1) {
|
||||||
|
withoutPrefix = withoutPrefix.substring(0, dotIndex);
|
||||||
|
}
|
||||||
|
FacMatrix matrix = null;
|
||||||
|
for (FacMatrix facMatrix : matrixList) {
|
||||||
|
String matrixName = facMatrix.getMatrixName();
|
||||||
|
String matrixName1 = matrixName.substring(1);
|
||||||
|
if (withoutPrefix.equals(matrixName1)) {
|
||||||
|
matrix = facMatrix;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (matrix == null) {
|
||||||
|
log.info("所属方阵为空,跳过");
|
||||||
|
return Collections.emptyList();
|
||||||
|
}
|
||||||
Long matrixId = matrix.getId();
|
Long matrixId = matrix.getId();
|
||||||
// ⑤ 获取进度类别
|
// ⑤ 获取进度类别
|
||||||
List<PgsProgressCategory> progressCategoryListByMatrix = progressCategoryMap.get(matrixId);
|
List<PgsProgressCategory> progressCategoryListByMatrix = progressCategoryMap.get(matrixId);
|
||||||
|
|||||||
@ -124,7 +124,7 @@ public interface WeatherConstant {
|
|||||||
*/
|
*/
|
||||||
static Map<String, List<String>> getWeatherStatusMap() {
|
static Map<String, List<String>> getWeatherStatusMap() {
|
||||||
Map<String, List<String>> weatherStatusMap = new HashMap<>();
|
Map<String, List<String>> weatherStatusMap = new HashMap<>();
|
||||||
weatherStatusMap.put("sunny", SUNNY);
|
weatherStatusMap.put("Sunny", SUNNY);
|
||||||
weatherStatusMap.put("manyCloud", MANY_CLOUD);
|
weatherStatusMap.put("manyCloud", MANY_CLOUD);
|
||||||
weatherStatusMap.put("cloudy", CLOUDY);
|
weatherStatusMap.put("cloudy", CLOUDY);
|
||||||
weatherStatusMap.put("smallRain", SMALL_RAIN);
|
weatherStatusMap.put("smallRain", SMALL_RAIN);
|
||||||
|
|||||||
@ -255,7 +255,7 @@ public class PgsConstructionSchedulePlanServiceImpl extends ServiceImpl<PgsConst
|
|||||||
// 主 Sheet 设置表头
|
// 主 Sheet 设置表头
|
||||||
Row sheetRow = mainSheet.createRow(0);
|
Row sheetRow = mainSheet.createRow(0);
|
||||||
String[] headers = {"编号(格式:1,1-1,1-1-1。用于进行父子结构关联)", "节点名称", "对应项目结构", "对应项目结构编码",
|
String[] headers = {"编号(格式:1,1-1,1-1-1。用于进行父子结构关联)", "节点名称", "对应项目结构", "对应项目结构编码",
|
||||||
"预计开始时间(格式:2025-09-06)", "预计结束时间", "实际开始时间", "实际结束时间", "状态", "状态编码", "备注"};
|
"预计开始时间(输入格式:2025-09-06)", "预计结束时间", "实际开始时间", "实际结束时间", "状态", "状态编码", "备注"};
|
||||||
for (int i = 0; i < headers.length; i++) {
|
for (int i = 0; i < headers.length; i++) {
|
||||||
Cell cell = sheetRow.createCell(i);
|
Cell cell = sheetRow.createCell(i);
|
||||||
cell.setCellValue(headers[i]);
|
cell.setCellValue(headers[i]);
|
||||||
@ -333,11 +333,11 @@ public class PgsConstructionSchedulePlanServiceImpl extends ServiceImpl<PgsConst
|
|||||||
|
|
||||||
|
|
||||||
// 调整列宽
|
// 调整列宽
|
||||||
mainSheet.setColumnWidth(0, 20 * 256);
|
mainSheet.setColumnWidth(0, 20 * 320);
|
||||||
mainSheet.setColumnWidth(1, 20 * 280);
|
mainSheet.setColumnWidth(1, 20 * 280);
|
||||||
mainSheet.setColumnWidth(2, 20 * 280);
|
mainSheet.setColumnWidth(2, 20 * 280);
|
||||||
mainSheet.setColumnWidth(3, 20 * 400);
|
mainSheet.setColumnWidth(3, 20 * 360);
|
||||||
mainSheet.setColumnWidth(4, 20 * 200);
|
mainSheet.setColumnWidth(4, 20 * 320);
|
||||||
mainSheet.setColumnWidth(5, 20 * 200);
|
mainSheet.setColumnWidth(5, 20 * 200);
|
||||||
mainSheet.setColumnWidth(6, 20 * 200);
|
mainSheet.setColumnWidth(6, 20 * 200);
|
||||||
mainSheet.setColumnWidth(7, 20 * 200);
|
mainSheet.setColumnWidth(7, 20 * 200);
|
||||||
|
|||||||
@ -1066,7 +1066,6 @@ public class BusProjectServiceImpl extends ServiceImpl<BusProjectMapper, BusProj
|
|||||||
for (FacMatrix matrix : matrixList) {
|
for (FacMatrix matrix : matrixList) {
|
||||||
map.put(matrix.getId(), "方阵:" + matrix.getMatrixName());
|
map.put(matrix.getId(), "方阵:" + matrix.getMatrixName());
|
||||||
}
|
}
|
||||||
}
|
|
||||||
// 获取分项工程
|
// 获取分项工程
|
||||||
List<PgsProgressCategory> progressCategoryList = progressCategoryService.lambdaQuery()
|
List<PgsProgressCategory> progressCategoryList = progressCategoryService.lambdaQuery()
|
||||||
.in(PgsProgressCategory::getMatrixId, matrixList.stream().map(FacMatrix::getId).toList())
|
.in(PgsProgressCategory::getMatrixId, matrixList.stream().map(FacMatrix::getId).toList())
|
||||||
@ -1082,6 +1081,7 @@ public class BusProjectServiceImpl extends ServiceImpl<BusProjectMapper, BusProj
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -15,13 +15,12 @@ import org.dromara.common.mybatis.core.page.TableDataInfo;
|
|||||||
import org.dromara.common.web.core.BaseController;
|
import org.dromara.common.web.core.BaseController;
|
||||||
import org.dromara.project.domain.vo.projectteam.BusProjectTeamForemanVo;
|
import org.dromara.project.domain.vo.projectteam.BusProjectTeamForemanVo;
|
||||||
import org.dromara.project.service.IBusProjectTeamService;
|
import org.dromara.project.service.IBusProjectTeamService;
|
||||||
import org.dromara.quality.domain.dto.qualityinspection.QltQualityInspectionCreateReq;
|
import org.dromara.quality.domain.QltQualityInspection;
|
||||||
import org.dromara.quality.domain.dto.qualityinspection.QltQualityInspectionGisReq;
|
import org.dromara.quality.domain.dto.qualityinspection.*;
|
||||||
import org.dromara.quality.domain.dto.qualityinspection.QltQualityInspectionQueryReq;
|
|
||||||
import org.dromara.quality.domain.dto.qualityinspection.QltQualityInspectionUpdateReq;
|
|
||||||
import org.dromara.quality.domain.vo.qualityinspection.QltQualityInspectionListGisVo;
|
import org.dromara.quality.domain.vo.qualityinspection.QltQualityInspectionListGisVo;
|
||||||
import org.dromara.quality.domain.vo.qualityinspection.QltQualityInspectionVo;
|
import org.dromara.quality.domain.vo.qualityinspection.QltQualityInspectionVo;
|
||||||
import org.dromara.quality.service.IQltQualityInspectionService;
|
import org.dromara.quality.service.IQltQualityInspectionService;
|
||||||
|
import org.springframework.beans.BeanUtils;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
@ -43,6 +42,13 @@ public class QltQualityInspectionController extends BaseController {
|
|||||||
|
|
||||||
private final IBusProjectTeamService busProjectTeamService;
|
private final IBusProjectTeamService busProjectTeamService;
|
||||||
|
|
||||||
|
@PutMapping("/test/add")
|
||||||
|
public R<Boolean> testAdd(QltQualityInspectionUpdateFileReq req) {
|
||||||
|
QltQualityInspection qualityInspection = new QltQualityInspection();
|
||||||
|
BeanUtils.copyProperties(req, qualityInspection);
|
||||||
|
return R.ok(qualityInspectionService.updateById(qualityInspection));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询质量-检查工单列表
|
* 查询质量-检查工单列表
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -0,0 +1,42 @@
|
|||||||
|
package org.dromara.quality.domain.dto.qualityinspection;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-09-19 14:45
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class QltQualityInspectionUpdateFileReq implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 4892385858816127150L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键
|
||||||
|
*/
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 巡检附件
|
||||||
|
*/
|
||||||
|
private String inspectionFile;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 巡检图片附件
|
||||||
|
*/
|
||||||
|
private String inspectionImgFile;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 整改附件
|
||||||
|
*/
|
||||||
|
private String rectificationFile;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 整改图片附件
|
||||||
|
*/
|
||||||
|
private String rectificationImgFile;
|
||||||
|
}
|
||||||
@ -13,10 +13,12 @@ import org.dromara.common.log.enums.BusinessType;
|
|||||||
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.web.core.BaseController;
|
import org.dromara.common.web.core.BaseController;
|
||||||
|
import org.dromara.safety.domain.HseSafetyInspection;
|
||||||
import org.dromara.safety.domain.dto.safetyinspection.*;
|
import org.dromara.safety.domain.dto.safetyinspection.*;
|
||||||
import org.dromara.safety.domain.vo.safetyinspection.HseSafetyInspectionListGisVo;
|
import org.dromara.safety.domain.vo.safetyinspection.HseSafetyInspectionListGisVo;
|
||||||
import org.dromara.safety.domain.vo.safetyinspection.HseSafetyInspectionVo;
|
import org.dromara.safety.domain.vo.safetyinspection.HseSafetyInspectionVo;
|
||||||
import org.dromara.safety.service.IHseSafetyInspectionService;
|
import org.dromara.safety.service.IHseSafetyInspectionService;
|
||||||
|
import org.springframework.beans.BeanUtils;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
@ -36,6 +38,13 @@ public class HseSafetyInspectionController extends BaseController {
|
|||||||
|
|
||||||
private final IHseSafetyInspectionService safetyInspectionService;
|
private final IHseSafetyInspectionService safetyInspectionService;
|
||||||
|
|
||||||
|
@PutMapping("/test/add")
|
||||||
|
public R<Boolean> testAdd(@Validated @RequestBody HseSafetyInspectionUpdateFileReq req) {
|
||||||
|
HseSafetyInspection inspection = new HseSafetyInspection();
|
||||||
|
BeanUtils.copyProperties(req, inspection);
|
||||||
|
return R.ok(safetyInspectionService.updateById(inspection));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询安全巡检工单列表
|
* 查询安全巡检工单列表
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -0,0 +1,32 @@
|
|||||||
|
package org.dromara.safety.domain.dto.safetyinspection;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-09-19 14:49
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class HseSafetyInspectionUpdateFileReq implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 3900623694038061296L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键ID
|
||||||
|
*/
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 检查附件
|
||||||
|
*/
|
||||||
|
private String checkFile;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 整改附件
|
||||||
|
*/
|
||||||
|
private String rectificationFile;
|
||||||
|
}
|
||||||
@ -6,7 +6,6 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
|||||||
import jakarta.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
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.quality.domain.vo.qualityinspection.QltQualityInspectionVo;
|
|
||||||
import org.dromara.safety.domain.HseSafetyInspection;
|
import org.dromara.safety.domain.HseSafetyInspection;
|
||||||
import org.dromara.safety.domain.dto.safetyinspection.*;
|
import org.dromara.safety.domain.dto.safetyinspection.*;
|
||||||
import org.dromara.safety.domain.vo.safetyinspection.HseSafetyInspectionListGisVo;
|
import org.dromara.safety.domain.vo.safetyinspection.HseSafetyInspectionListGisVo;
|
||||||
|
|||||||
@ -312,9 +312,11 @@ public class HseSafetyInspectionServiceImpl extends ServiceImpl<HseSafetyInspect
|
|||||||
safetyInspectionVo.setRectificationName(contractor.getName());
|
safetyInspectionVo.setRectificationName(contractor.getName());
|
||||||
} else if (rectificationUnit.equals(InspectionRectificationUnitType.TEAM.getValue())) {
|
} else if (rectificationUnit.equals(InspectionRectificationUnitType.TEAM.getValue())) {
|
||||||
BusProjectTeam team = projectTeamService.getById(rectificationId);
|
BusProjectTeam team = projectTeamService.getById(rectificationId);
|
||||||
|
if (team != null) {
|
||||||
safetyInspectionVo.setRectificationName(team.getTeamName());
|
safetyInspectionVo.setRectificationName(team.getTeamName());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return safetyInspectionVo;
|
return safetyInspectionVo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -61,6 +61,20 @@ public class SysOssController extends BaseController {
|
|||||||
return R.ok(list);
|
return R.ok(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上传OSS对象存储
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@PostMapping(value = "/uploadFileUrl")
|
||||||
|
public R<SysOssUploadVo> uploadFileUrl(String url, String fileName) {
|
||||||
|
SysOssVo oss = ossService.uploadFileUrl(url, fileName);
|
||||||
|
SysOssUploadVo uploadVo = new SysOssUploadVo();
|
||||||
|
uploadVo.setUrl(oss.getUrl());
|
||||||
|
uploadVo.setFileName(oss.getOriginalName());
|
||||||
|
uploadVo.setOssId(oss.getOssId().toString());
|
||||||
|
return R.ok(uploadVo);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 上传OSS对象存储
|
* 上传OSS对象存储
|
||||||
*
|
*
|
||||||
|
|||||||
Reference in New Issue
Block a user