Merge branch 'main' of http://121.37.111.42:3000/zhengsl/WholeProcessPlatform into main_hzz
This commit is contained in:
commit
d1e74a1950
@ -75,16 +75,16 @@ public class JobRunner implements ApplicationRunner {
|
|||||||
ao.setStartTime(DateUtil.beginOfYear(DateUtil.offset(ao.getEndTime(), DateField.YEAR,-1)));
|
ao.setStartTime(DateUtil.beginOfYear(DateUtil.offset(ao.getEndTime(), DateField.YEAR,-1)));
|
||||||
}
|
}
|
||||||
envWqDataService.wqLastData(ao);
|
envWqDataService.wqLastData(ao);
|
||||||
log.info("--------------------wq最新一条数据---------------------");
|
// log.info("--------------------wq最新一条数据---------------------");
|
||||||
eqJobService.eqAnchorPointLastDate(ao);
|
// eqJobService.eqAnchorPointLastDate(ao);
|
||||||
log.info("--------------------eq最新一条数据---------------------");
|
// log.info("--------------------eq最新一条数据---------------------");
|
||||||
eqJobService.eqAnchorPointLastDate(ao);
|
// eqJobService.eqAnchorPointLastDate(ao);
|
||||||
log.info("--------------------eq最新一条数据---------------------");
|
// log.info("--------------------eq最新一条数据---------------------");
|
||||||
dwJobService.wtLastData(ao);
|
// dwJobService.wtLastData(ao);
|
||||||
log.info("--------------------wt最新一条数据---------------------");
|
// log.info("--------------------wt最新一条数据---------------------");
|
||||||
dwJobService.wtvtPointData(ao);
|
// dwJobService.wtvtPointData(ao);
|
||||||
log.info("--------------------wt最新一条数据---------------------");
|
// log.info("--------------------wt最新一条数据---------------------");
|
||||||
fhJobService.zqLastData(ao);
|
// fhJobService.zqLastData(ao);
|
||||||
log.info("--------------------fh最新一条数据---------------------");
|
// log.info("--------------------fh最新一条数据---------------------");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -42,7 +42,8 @@ public class MsOperationLog implements Serializable {
|
|||||||
/**
|
/**
|
||||||
* 操作记录的名称(瞬态字段,不持久化,由后端查询后填充)
|
* 操作记录的名称(瞬态字段,不持久化,由后端查询后填充)
|
||||||
*/
|
*/
|
||||||
@TableField(exist = false)
|
// @TableField(exist = false)
|
||||||
|
@TableField("RECORD_NAME")
|
||||||
private String recordName;
|
private String recordName;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -63,6 +63,9 @@ public class SdDwBH implements Serializable {
|
|||||||
@FieldChinese("是否启用")
|
@FieldChinese("是否启用")
|
||||||
private Integer usfl;
|
private Integer usfl;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String usflName;
|
||||||
|
|
||||||
/** 数据是否接入:0=未接入 1=已接入 */
|
/** 数据是否接入:0=未接入 1=已接入 */
|
||||||
@FieldChinese("数据是否接入")
|
@FieldChinese("数据是否接入")
|
||||||
private Integer dtin;
|
private Integer dtin;
|
||||||
@ -154,10 +157,16 @@ public class SdDwBH implements Serializable {
|
|||||||
@FieldChinese("投资是否计入主体工程")
|
@FieldChinese("投资是否计入主体工程")
|
||||||
private Integer invinmn;
|
private Integer invinmn;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String invinmnName;
|
||||||
|
|
||||||
/** 是否有调度规程分析:0=无调度规程 1=有调度规程 */
|
/** 是否有调度规程分析:0=无调度规程 1=有调度规程 */
|
||||||
@FieldChinese("是否有调度规程分析")
|
@FieldChinese("是否有调度规程分析")
|
||||||
private Integer dispatch;
|
private Integer dispatch;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String dispatchName;
|
||||||
|
|
||||||
/** 调度规程文字描述 */
|
/** 调度规程文字描述 */
|
||||||
@FieldChinese("调度规程文字描述")
|
@FieldChinese("调度规程文字描述")
|
||||||
private String dispatchDes;
|
private String dispatchDes;
|
||||||
|
|||||||
@ -0,0 +1,23 @@
|
|||||||
|
package com.yfd.platform.qgc_base.entity.vo;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Schema(description = "批量删除参数")
|
||||||
|
public class BatchDeleteByIdsAo implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@Schema(description = "数据来源")
|
||||||
|
private String source;
|
||||||
|
|
||||||
|
@Schema(description = "数据类型")
|
||||||
|
private String dataType;
|
||||||
|
|
||||||
|
@Schema(description = "删除数据列表")
|
||||||
|
private List<String> ids;
|
||||||
|
}
|
||||||
@ -67,7 +67,7 @@ public class MsEiaApprovalBServiceImpl extends ServiceImpl<MsEiaApprovalBMapper,
|
|||||||
wrapper.set(MsEiaApprovalB::getDeleteUser, SecurityUtils.getCurrentUsername());
|
wrapper.set(MsEiaApprovalB::getDeleteUser, SecurityUtils.getCurrentUsername());
|
||||||
wrapper.set(MsEiaApprovalB::getDeleteTime, new Date());
|
wrapper.set(MsEiaApprovalB::getDeleteTime, new Date());
|
||||||
if (this.update(wrapper)) {
|
if (this.update(wrapper)) {
|
||||||
msOperationLogService.recordDeleteDetailLog(id,TABLE_NAME, entity, source);
|
msOperationLogService.recordDeleteDetailLog(entity.getEnnm(),TABLE_NAME, entity, source);
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -73,6 +73,8 @@ public class MsOperationLogServiceImpl extends ServiceImpl<MsOperationLogMapper,
|
|||||||
static {
|
static {
|
||||||
// Engine Info: 名称列是 ENNM 而非 STNM
|
// Engine Info: 名称列是 ENNM 而非 STNM
|
||||||
TABLE_NAME_CONFIG_MAP.put("SD_ENGINFO_B_H", TableNameConfig.self("STCD", "ENNM"));
|
TABLE_NAME_CONFIG_MAP.put("SD_ENGINFO_B_H", TableNameConfig.self("STCD", "ENNM"));
|
||||||
|
TABLE_NAME_CONFIG_MAP.put("SD_WE_B_H", TableNameConfig.self("STCD", "STNM"));
|
||||||
|
|
||||||
// Hydro Base: 主键列是 BASEID,名称列是 BASENAME
|
// Hydro Base: 主键列是 BASEID,名称列是 BASENAME
|
||||||
TABLE_NAME_CONFIG_MAP.put("SD_HYDROBASE", TableNameConfig.self("BASEID", "BASENAME"));
|
TABLE_NAME_CONFIG_MAP.put("SD_HYDROBASE", TableNameConfig.self("BASEID", "BASENAME"));
|
||||||
// Fish Dictionary: 需确认结构后配置
|
// Fish Dictionary: 需确认结构后配置
|
||||||
@ -85,7 +87,7 @@ public class MsOperationLogServiceImpl extends ServiceImpl<MsOperationLogMapper,
|
|||||||
TABLE_NAME_CONFIG_MAP.put("SD_WTRV_R", TableNameConfig.join("ID", "STCD", "V_MS_STBPRP_T", "STNM"));
|
TABLE_NAME_CONFIG_MAP.put("SD_WTRV_R", TableNameConfig.join("ID", "STCD", "V_MS_STBPRP_T", "STNM"));
|
||||||
TABLE_NAME_CONFIG_MAP.put("SD_WTVT_R", TableNameConfig.join("STCD", "STCD", "V_MS_STBPRP_T", "STNM"));
|
TABLE_NAME_CONFIG_MAP.put("SD_WTVT_R", TableNameConfig.join("STCD", "STCD", "V_MS_STBPRP_T", "STNM"));
|
||||||
TABLE_NAME_CONFIG_MAP.put("SD_WQ_R", TableNameConfig.join("ID", "STCD", "V_MS_STBPRP_T", "STNM"));
|
TABLE_NAME_CONFIG_MAP.put("SD_WQ_R", TableNameConfig.join("ID", "STCD", "V_MS_STBPRP_T", "STNM"));
|
||||||
TABLE_NAME_CONFIG_MAP.put("SD_RPIMNFISH_R", TableNameConfig.join("ID", "STCD", "V_MS_STBPRP_T", "STNM"));
|
TABLE_NAME_CONFIG_MAP.put("SD_RPIMNFISH_R", TableNameConfig.self("ID", "ID" ));
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -343,7 +345,7 @@ public class MsOperationLogServiceImpl extends ServiceImpl<MsOperationLogMapper,
|
|||||||
if (engInfo == null) {
|
if (engInfo == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
MsOperationLog mainLog = buildMainLog(engInfo.getStcd(),"新增", source,"01");
|
MsOperationLog mainLog = buildMainLog(engInfo.getStcd(),engInfo.getEnnm(),"新增", source,"01");
|
||||||
msOperationLogMapper.insert(mainLog);
|
msOperationLogMapper.insert(mainLog);
|
||||||
|
|
||||||
List<MsOperationLogDetail> details = new ArrayList<>();
|
List<MsOperationLogDetail> details = new ArrayList<>();
|
||||||
@ -379,7 +381,7 @@ public class MsOperationLogServiceImpl extends ServiceImpl<MsOperationLogMapper,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
MsOperationLog mainLog = buildMainLog(before.getStcd(),"修改电站", source,"02");
|
MsOperationLog mainLog = buildMainLog(before.getStcd(),before.getEnnm(),"修改电站", source,"02");
|
||||||
msOperationLogMapper.insert(mainLog);
|
msOperationLogMapper.insert(mainLog);
|
||||||
|
|
||||||
List<MsOperationLogDetail> details = new ArrayList<>();
|
List<MsOperationLogDetail> details = new ArrayList<>();
|
||||||
@ -416,7 +418,7 @@ public class MsOperationLogServiceImpl extends ServiceImpl<MsOperationLogMapper,
|
|||||||
if (engInfo == null) {
|
if (engInfo == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
MsOperationLog mainLog = buildMainLog(engInfo.getStcd(),"删除电站", source,"03");
|
MsOperationLog mainLog = buildMainLog(engInfo.getStcd(),engInfo.getEnnm(),"删除电站", source,"03");
|
||||||
msOperationLogMapper.insert(mainLog);
|
msOperationLogMapper.insert(mainLog);
|
||||||
|
|
||||||
List<MsOperationLogDetail> details = new ArrayList<>();
|
List<MsOperationLogDetail> details = new ArrayList<>();
|
||||||
@ -446,14 +448,15 @@ public class MsOperationLogServiceImpl extends ServiceImpl<MsOperationLogMapper,
|
|||||||
batchInsertDetails(details);
|
batchInsertDetails(details);
|
||||||
}
|
}
|
||||||
|
|
||||||
private MsOperationLog buildMainLog(String recordId,String remark, String source,String operationType) {
|
private MsOperationLog buildMainLog(String recordId, String recordName,String remark, String source,String operationType) {
|
||||||
return buildMainLog(ENG_TABLE_NAME, recordId, remark, source,operationType);
|
return buildMainLog(ENG_TABLE_NAME, recordId,recordName, remark, source,operationType);
|
||||||
}
|
}
|
||||||
|
|
||||||
private MsOperationLog buildMainLog(String tableName, String recordId, String remark, String source,String operationType) {
|
private MsOperationLog buildMainLog(String tableName, String recordId, String recordName, String remark, String source,String operationType) {
|
||||||
MsOperationLog log = new MsOperationLog();
|
MsOperationLog log = new MsOperationLog();
|
||||||
log.setOperator(resolveOperator());
|
log.setOperator(resolveOperator());
|
||||||
log.setOperateTime(new Date());
|
log.setOperateTime(new Date());
|
||||||
|
log.setRecordName(recordName);
|
||||||
log.setTableName(tableName);
|
log.setTableName(tableName);
|
||||||
log.setRecordId(recordId);
|
log.setRecordId(recordId);
|
||||||
log.setSource(StrUtil.trimToNull(source));
|
log.setSource(StrUtil.trimToNull(source));
|
||||||
@ -546,7 +549,9 @@ public class MsOperationLogServiceImpl extends ServiceImpl<MsOperationLogMapper,
|
|||||||
}
|
}
|
||||||
Map<String, String> codeToNameFieldMap = buildCodeToNameFieldMap(codeToNameMetaList);
|
Map<String, String> codeToNameFieldMap = buildCodeToNameFieldMap(codeToNameMetaList);
|
||||||
|
|
||||||
MsOperationLog mainLog = buildMainLog(tableName, recordId, "新增", source,"01");
|
// 调用示例:尝试获取 name,如果没有则尝试获取 code
|
||||||
|
String stnm = getFieldValue(entity, "stnm");
|
||||||
|
MsOperationLog mainLog = buildMainLog(tableName, recordId, stnm, "新增", source,"01");
|
||||||
msOperationLogMapper.insert(mainLog);
|
msOperationLogMapper.insert(mainLog);
|
||||||
|
|
||||||
List<MsOperationLogDetail> details = new ArrayList<>();
|
List<MsOperationLogDetail> details = new ArrayList<>();
|
||||||
@ -578,6 +583,17 @@ public class MsOperationLogServiceImpl extends ServiceImpl<MsOperationLogMapper,
|
|||||||
batchInsertDetails(details);
|
batchInsertDetails(details);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static String getFieldValue(Object obj, String fieldName) {
|
||||||
|
try {
|
||||||
|
Field field = obj.getClass().getDeclaredField(fieldName);
|
||||||
|
field.setAccessible(true);
|
||||||
|
Object value = field.get(obj);
|
||||||
|
return value == null ? null : value.toString();
|
||||||
|
} catch (NoSuchFieldException | IllegalAccessException e) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public <T> void recordDeleteDetailLog(String recordId,String tableName, T entity, String source) {
|
public <T> void recordDeleteDetailLog(String recordId,String tableName, T entity, String source) {
|
||||||
if (entity == null) {
|
if (entity == null) {
|
||||||
@ -619,7 +635,8 @@ public class MsOperationLogServiceImpl extends ServiceImpl<MsOperationLogMapper,
|
|||||||
}
|
}
|
||||||
Map<String, String> codeToNameFieldMap = buildCodeToNameFieldMap(codeToNameMetaList);
|
Map<String, String> codeToNameFieldMap = buildCodeToNameFieldMap(codeToNameMetaList);
|
||||||
|
|
||||||
MsOperationLog mainLog = buildMainLog(tableName, recordId, "修改", source,"02");
|
String stnm = getFieldValue(after, "stnm");
|
||||||
|
MsOperationLog mainLog = buildMainLog(tableName, recordId,stnm, "修改", source,"02");
|
||||||
msOperationLogMapper.insert(mainLog);
|
msOperationLogMapper.insert(mainLog);
|
||||||
|
|
||||||
List<MsOperationLogDetail> details = new ArrayList<>();
|
List<MsOperationLogDetail> details = new ArrayList<>();
|
||||||
@ -662,8 +679,8 @@ public class MsOperationLogServiceImpl extends ServiceImpl<MsOperationLogMapper,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Map<String, String> codeToNameFieldMap = buildCodeToNameFieldMap(codeToNameMetaList);
|
Map<String, String> codeToNameFieldMap = buildCodeToNameFieldMap(codeToNameMetaList);
|
||||||
|
String stnm = getFieldValue(entity, "stnm");
|
||||||
MsOperationLog mainLog = buildMainLog(tableName, recordId, "删除", source,"03");
|
MsOperationLog mainLog = buildMainLog(tableName, recordId,stnm, "删除", source,"03");
|
||||||
msOperationLogMapper.insert(mainLog);
|
msOperationLogMapper.insert(mainLog);
|
||||||
|
|
||||||
List<MsOperationLogDetail> details = new ArrayList<>();
|
List<MsOperationLogDetail> details = new ArrayList<>();
|
||||||
|
|||||||
@ -210,7 +210,7 @@ public class MsPsbmodulelbBServiceImpl extends ServiceImpl<MsPsbmodulelbBMapper,
|
|||||||
wrapper.set(MsPsbmodulelbB::getDeleteTime, new Date());
|
wrapper.set(MsPsbmodulelbB::getDeleteTime, new Date());
|
||||||
boolean result = this.update(wrapper);
|
boolean result = this.update(wrapper);
|
||||||
if (result) {
|
if (result) {
|
||||||
msOperationLogService.recordDeleteDetailLog(id, TABLE_NAME, entity, "psbmodulelbb");
|
msOperationLogService.recordDeleteDetailLog(entity.getId(), TABLE_NAME, entity, "psbmodulelbb");
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -347,7 +347,7 @@ public class MsWarnRuleBServiceImpl extends ServiceImpl<MsWarnRuleBMapper, MsWar
|
|||||||
updateWrapper.set(MsWarnRuleB::getDeleteTime, new Date());
|
updateWrapper.set(MsWarnRuleB::getDeleteTime, new Date());
|
||||||
this.update(updateWrapper);
|
this.update(updateWrapper);
|
||||||
if (entity != null) {
|
if (entity != null) {
|
||||||
msOperationLogService.recordDeleteDetailLog(id, TABLE_NAME, entity, "warningRule");
|
msOperationLogService.recordDeleteDetailLog(entity.getRuleName(), TABLE_NAME, entity, "warningRule");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -129,7 +129,7 @@ public class SdAiboxBHServiceImpl extends ServiceImpl<SdAiboxBHMapper, SdAiboxBH
|
|||||||
wrapper.set(SdAiboxBH::getDeleteTime, new Date());
|
wrapper.set(SdAiboxBH::getDeleteTime, new Date());
|
||||||
if (this.update(wrapper)) {
|
if (this.update(wrapper)) {
|
||||||
dictCodeToNameConverter.convertCodeToName(entity, CODE_TO_NAME_META_LIST);
|
dictCodeToNameConverter.convertCodeToName(entity, CODE_TO_NAME_META_LIST);
|
||||||
msOperationLogService.recordDeleteDetailLog(stcd,TABLE_NAME, entity, source, CODE_TO_NAME_META_LIST); count++;
|
msOperationLogService.recordDeleteDetailLog(entity.getStcd(),TABLE_NAME, entity, source, CODE_TO_NAME_META_LIST); count++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return count > 0;
|
return count > 0;
|
||||||
|
|||||||
@ -110,7 +110,7 @@ public class SdAimonitorBHServiceImpl extends ServiceImpl<SdAimonitorBHMapper, S
|
|||||||
wrapper.set(SdAimonitorBH::getDeleteTime, new Date());
|
wrapper.set(SdAimonitorBH::getDeleteTime, new Date());
|
||||||
if (this.update(wrapper)) {
|
if (this.update(wrapper)) {
|
||||||
dictCodeToNameConverter.convertCodeToName(entity, CODE_TO_NAME_META_LIST);
|
dictCodeToNameConverter.convertCodeToName(entity, CODE_TO_NAME_META_LIST);
|
||||||
msOperationLogService.recordDeleteDetailLog(stcd,TABLE_NAME, entity, source, CODE_TO_NAME_META_LIST);
|
msOperationLogService.recordDeleteDetailLog(entity.getStcd(),TABLE_NAME, entity, source, CODE_TO_NAME_META_LIST);
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -117,7 +117,7 @@ public class SdArtsgBHServiceImpl extends ServiceImpl<SdArtsgBHMapper, SdArtsgBH
|
|||||||
SdArtsgBH entity = this.getById(stcd);
|
SdArtsgBH entity = this.getById(stcd);
|
||||||
if (this.removeById(stcd)) {
|
if (this.removeById(stcd)) {
|
||||||
dictCodeToNameConverter.convertCodeToName(entity, CODE_TO_NAME_META_LIST);
|
dictCodeToNameConverter.convertCodeToName(entity, CODE_TO_NAME_META_LIST);
|
||||||
msOperationLogService.recordDeleteDetailLog(stcd,TABLE_NAME, entity, source, CODE_TO_NAME_META_LIST); count++;
|
msOperationLogService.recordDeleteDetailLog(entity.getStcd(),TABLE_NAME, entity, source, CODE_TO_NAME_META_LIST); count++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return count > 0;
|
return count > 0;
|
||||||
|
|||||||
@ -59,6 +59,10 @@ public class SdDwBHServiceImpl extends ServiceImpl<SdDwBHMapper, SdDwBH> impleme
|
|||||||
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("sttp").modifyProperty("sttpName").dictType("DYNAMIC").dictSource("SD_STTP_B").codeColumn("STTP_CODE").nameColumn("STTP_NAME").filter("IS_DELETED = 0 ").build());
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("sttp").modifyProperty("sttpName").dictType("DYNAMIC").dictSource("SD_STTP_B").codeColumn("STTP_CODE").nameColumn("STTP_NAME").filter("IS_DELETED = 0 ").build());
|
||||||
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("baseId").modifyProperty("baseName").dictType("DYNAMIC").dictSource("SD_HYDROBASE").codeColumn("BASEID").nameColumn("BASENAME").filter("IS_DELETED = 0 ").build());
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("baseId").modifyProperty("baseName").dictType("DYNAMIC").dictSource("SD_HYDROBASE").codeColumn("BASEID").nameColumn("BASENAME").filter("IS_DELETED = 0 ").build());
|
||||||
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("rstcd").modifyProperty("ennm").dictType("DYNAMIC").dictSource("SD_ENGINFO_B_H").codeColumn("STCD").nameColumn("ENNM").filter("IS_DELETED = 0 ").build());
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("rstcd").modifyProperty("ennm").dictType("DYNAMIC").dictSource("SD_ENGINFO_B_H").codeColumn("STCD").nameColumn("ENNM").filter("IS_DELETED = 0 ").build());
|
||||||
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("usfl").modifyProperty("usflName").dictType("STATIC").dictSource("TY_SF").build());
|
||||||
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("invinmn").modifyProperty("invinmnName").dictType("STATIC").dictSource("TY_SF").build());
|
||||||
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("dispatch").modifyProperty("dispatchName").dictType("STATIC").dictSource("DISPATCH").build());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -119,7 +123,7 @@ public class SdDwBHServiceImpl extends ServiceImpl<SdDwBHMapper, SdDwBH> impleme
|
|||||||
wrapper.set(SdDwBH::getDeleteTime, new Date());
|
wrapper.set(SdDwBH::getDeleteTime, new Date());
|
||||||
if (this.update(wrapper)) {
|
if (this.update(wrapper)) {
|
||||||
dictCodeToNameConverter.convertCodeToName(entity, CODE_TO_NAME_META_LIST);
|
dictCodeToNameConverter.convertCodeToName(entity, CODE_TO_NAME_META_LIST);
|
||||||
msOperationLogService.recordDeleteDetailLog(stcd, TABLE_NAME, entity, source, CODE_TO_NAME_META_LIST);
|
msOperationLogService.recordDeleteDetailLog(entity.getStcd(), TABLE_NAME, entity, source, CODE_TO_NAME_META_LIST);
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -119,7 +119,7 @@ public class SdEqBHServiceImpl extends ServiceImpl<SdEqBHMapper, SdEqBH> impleme
|
|||||||
wrapper.set(SdEqBH::getDeleteTime, new Date());
|
wrapper.set(SdEqBH::getDeleteTime, new Date());
|
||||||
if (this.update(wrapper)) {
|
if (this.update(wrapper)) {
|
||||||
dictCodeToNameConverter.convertCodeToName(entity, CODE_TO_NAME_META_LIST);
|
dictCodeToNameConverter.convertCodeToName(entity, CODE_TO_NAME_META_LIST);
|
||||||
msOperationLogService.recordDeleteDetailLog(stcd,TABLE_NAME, entity, source, CODE_TO_NAME_META_LIST); count++;
|
msOperationLogService.recordDeleteDetailLog(entity.getStcd(),TABLE_NAME, entity, source, CODE_TO_NAME_META_LIST); count++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return count > 0;
|
return count > 0;
|
||||||
|
|||||||
@ -116,7 +116,7 @@ public class SdFbrdBHServiceImpl extends ServiceImpl<SdFbrdBHMapper, SdFbrdBH> i
|
|||||||
SdFbrdBH entity = this.getById(stcd);
|
SdFbrdBH entity = this.getById(stcd);
|
||||||
if (this.removeById(stcd)) {
|
if (this.removeById(stcd)) {
|
||||||
dictCodeToNameConverter.convertCodeToName(entity, CODE_TO_NAME_META_LIST);
|
dictCodeToNameConverter.convertCodeToName(entity, CODE_TO_NAME_META_LIST);
|
||||||
msOperationLogService.recordDeleteDetailLog(stcd,TABLE_NAME, entity, source, CODE_TO_NAME_META_LIST);
|
msOperationLogService.recordDeleteDetailLog(entity.getStcd(),TABLE_NAME, entity, source, CODE_TO_NAME_META_LIST);
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -120,7 +120,7 @@ public class SdFhbtBHServiceImpl extends ServiceImpl<SdFhbtBHMapper, SdFhbtBH> i
|
|||||||
wrapper.set(SdFhbtBH::getDeleteTime, new Date());
|
wrapper.set(SdFhbtBH::getDeleteTime, new Date());
|
||||||
if (this.update(wrapper)) {
|
if (this.update(wrapper)) {
|
||||||
dictCodeToNameConverter.convertCodeToName(entity, CODE_TO_NAME_META_LIST);
|
dictCodeToNameConverter.convertCodeToName(entity, CODE_TO_NAME_META_LIST);
|
||||||
msOperationLogService.recordDeleteDetailLog(stcd,TABLE_NAME, entity, source, CODE_TO_NAME_META_LIST); count++;
|
msOperationLogService.recordDeleteDetailLog(entity.getStcd(),TABLE_NAME, entity, source, CODE_TO_NAME_META_LIST); count++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return count > 0;
|
return count > 0;
|
||||||
|
|||||||
@ -126,7 +126,7 @@ public class SdFishDictoryBServiceImpl extends ServiceImpl<SdFishDictoryBMapper,
|
|||||||
wrapper.set(SdFishDictoryB::getDeleteTime, new Date());
|
wrapper.set(SdFishDictoryB::getDeleteTime, new Date());
|
||||||
if (this.update(wrapper)) {
|
if (this.update(wrapper)) {
|
||||||
dictCodeToNameConverter.convertCodeToName(entity, CODE_TO_NAME_META_LIST);
|
dictCodeToNameConverter.convertCodeToName(entity, CODE_TO_NAME_META_LIST);
|
||||||
msOperationLogService.recordDeleteDetailLog(id,TABLE_NAME, entity, source,CODE_TO_NAME_META_LIST);
|
msOperationLogService.recordDeleteDetailLog(entity.getName(),TABLE_NAME, entity, source,CODE_TO_NAME_META_LIST);
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -291,7 +291,7 @@ public class SdFpssBHServiceImpl extends ServiceImpl<SdFpssBHMapper, SdFpssBH> i
|
|||||||
wrapper.set(SdFpssBH::getDeleteTime, new Date());
|
wrapper.set(SdFpssBH::getDeleteTime, new Date());
|
||||||
if (this.update(wrapper)) {
|
if (this.update(wrapper)) {
|
||||||
dictCodeToNameConverter.convertCodeToName(entity, CODE_TO_NAME_META_LIST);
|
dictCodeToNameConverter.convertCodeToName(entity, CODE_TO_NAME_META_LIST);
|
||||||
msOperationLogService.recordDeleteDetailLog(stcd,TABLE_NAME, entity, source, CODE_TO_NAME_META_LIST); count++;
|
msOperationLogService.recordDeleteDetailLog(entity.getStcd(),TABLE_NAME, entity, source, CODE_TO_NAME_META_LIST); count++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return count > 0;
|
return count > 0;
|
||||||
|
|||||||
@ -129,7 +129,7 @@ public class SdFpssRServiceImpl extends ServiceImpl<SdFpssRMapper, SdFpssR> impl
|
|||||||
wrapper.set(SdFpssR::getDeleteTime, new Date());
|
wrapper.set(SdFpssR::getDeleteTime, new Date());
|
||||||
if (this.update(wrapper)) {
|
if (this.update(wrapper)) {
|
||||||
dictCodeToNameConverter.convertCodeToName(entity, CODE_TO_NAME_META_LIST);
|
dictCodeToNameConverter.convertCodeToName(entity, CODE_TO_NAME_META_LIST);
|
||||||
msOperationLogService.recordDeleteDetailLog(id, TABLE_NAME, entity, source, CODE_TO_NAME_META_LIST);
|
msOperationLogService.recordDeleteDetailLog(entity.getFtpName(), TABLE_NAME, entity, source, CODE_TO_NAME_META_LIST);
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -120,7 +120,7 @@ public class SdOpinfoBHServiceImpl extends ServiceImpl<SdOpinfoBHMapper, SdOpinf
|
|||||||
wrapper.set(SdOpinfoBH::getDeleteTime, new Date());
|
wrapper.set(SdOpinfoBH::getDeleteTime, new Date());
|
||||||
if (this.update(wrapper)) {
|
if (this.update(wrapper)) {
|
||||||
dictCodeToNameConverter.convertCodeToName(entity, CODE_TO_NAME_META_LIST);
|
dictCodeToNameConverter.convertCodeToName(entity, CODE_TO_NAME_META_LIST);
|
||||||
msOperationLogService.recordDeleteDetailLog(stcd,TABLE_NAME, entity, source, CODE_TO_NAME_META_LIST);
|
msOperationLogService.recordDeleteDetailLog(entity.getStcd(),TABLE_NAME, entity, source, CODE_TO_NAME_META_LIST);
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -119,7 +119,7 @@ public class SdOtteBHServiceImpl extends ServiceImpl<SdOtteBHMapper, SdOtteBH> i
|
|||||||
SdOtteBH entity = this.getById(stcd);
|
SdOtteBH entity = this.getById(stcd);
|
||||||
if (this.removeById(stcd)) {
|
if (this.removeById(stcd)) {
|
||||||
dictCodeToNameConverter.convertCodeToName(entity, CODE_TO_NAME_META_LIST);
|
dictCodeToNameConverter.convertCodeToName(entity, CODE_TO_NAME_META_LIST);
|
||||||
msOperationLogService.recordDeleteDetailLog(stcd,TABLE_NAME, entity, source, CODE_TO_NAME_META_LIST);
|
msOperationLogService.recordDeleteDetailLog(entity.getStcd(),TABLE_NAME, entity, source, CODE_TO_NAME_META_LIST);
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -117,7 +117,7 @@ public class SdOtweBHServiceImpl extends ServiceImpl<SdOtweBHMapper, SdOtweBH> i
|
|||||||
SdOtweBH entity = this.getById(stcd);
|
SdOtweBH entity = this.getById(stcd);
|
||||||
if (this.removeById(stcd)) {
|
if (this.removeById(stcd)) {
|
||||||
dictCodeToNameConverter.convertCodeToName(entity, CODE_TO_NAME_META_LIST);
|
dictCodeToNameConverter.convertCodeToName(entity, CODE_TO_NAME_META_LIST);
|
||||||
msOperationLogService.recordDeleteDetailLog(stcd,TABLE_NAME, entity, source, CODE_TO_NAME_META_LIST);
|
msOperationLogService.recordDeleteDetailLog(entity.getStcd(),TABLE_NAME, entity, source, CODE_TO_NAME_META_LIST);
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -122,7 +122,7 @@ public class SdSonarBHServiceImpl extends ServiceImpl<SdSonarBHMapper, SdSonarBH
|
|||||||
SdSonarBH entity = this.getById(stcd);
|
SdSonarBH entity = this.getById(stcd);
|
||||||
if (this.update(wrapper)) {
|
if (this.update(wrapper)) {
|
||||||
dictCodeToNameConverter.convertCodeToName(entity, CODE_TO_NAME_META_LIST);
|
dictCodeToNameConverter.convertCodeToName(entity, CODE_TO_NAME_META_LIST);
|
||||||
msOperationLogService.recordDeleteDetailLog(stcd,TABLE_NAME, entity, source, CODE_TO_NAME_META_LIST);
|
msOperationLogService.recordDeleteDetailLog(entity.getStcd(),TABLE_NAME, entity, source, CODE_TO_NAME_META_LIST);
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -116,7 +116,7 @@ public class SdTeBHServiceImpl extends ServiceImpl<SdTeBHMapper, SdTeBH> impleme
|
|||||||
for (String stcd : stcds) {
|
for (String stcd : stcds) {
|
||||||
SdTeBH entity = this.getById(stcd);
|
SdTeBH entity = this.getById(stcd);
|
||||||
if (this.removeById(stcd)) {
|
if (this.removeById(stcd)) {
|
||||||
msOperationLogService.recordDeleteDetailLog(stcd,TABLE_NAME, entity, source, CODE_TO_NAME_META_LIST);
|
msOperationLogService.recordDeleteDetailLog(entity.getStcd(),TABLE_NAME, entity, source, CODE_TO_NAME_META_LIST);
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -118,7 +118,7 @@ public class SdVaBHServiceImpl extends ServiceImpl<SdVaBHMapper, SdVaBH> impleme
|
|||||||
wrapper.set(SdVaBH::getDeleteTime, new Date());
|
wrapper.set(SdVaBH::getDeleteTime, new Date());
|
||||||
if (this.update(wrapper)) {
|
if (this.update(wrapper)) {
|
||||||
dictCodeToNameConverter.convertCodeToName(entity, CODE_TO_NAME_META_LIST);
|
dictCodeToNameConverter.convertCodeToName(entity, CODE_TO_NAME_META_LIST);
|
||||||
msOperationLogService.recordDeleteDetailLog(stcd,TABLE_NAME, entity, source, CODE_TO_NAME_META_LIST);
|
msOperationLogService.recordDeleteDetailLog(entity.getStcd(),TABLE_NAME, entity, source, CODE_TO_NAME_META_LIST);
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -121,7 +121,7 @@ public class SdVdinfoBServiceImpl extends ServiceImpl<SdVdinfoBMapper, SdVdinfoB
|
|||||||
SdVdinfoB entity = this.getById(stcd);
|
SdVdinfoB entity = this.getById(stcd);
|
||||||
if (this.removeById(stcd)) {
|
if (this.removeById(stcd)) {
|
||||||
dictCodeToNameConverter.convertCodeToName(entity, CODE_TO_NAME_META_LIST);
|
dictCodeToNameConverter.convertCodeToName(entity, CODE_TO_NAME_META_LIST);
|
||||||
msOperationLogService.recordDeleteDetailLog(stcd,TABLE_NAME, entity, source, CODE_TO_NAME_META_LIST); count++;
|
msOperationLogService.recordDeleteDetailLog(entity.getStcd(),TABLE_NAME, entity, source, CODE_TO_NAME_META_LIST); count++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return count > 0;
|
return count > 0;
|
||||||
|
|||||||
@ -118,7 +118,7 @@ public class SdVpBHServiceImpl extends ServiceImpl<SdVpBHMapper, SdVpBH> impleme
|
|||||||
wrapper.set(SdVpBH::getDeleteTime, new Date());
|
wrapper.set(SdVpBH::getDeleteTime, new Date());
|
||||||
if (this.update(wrapper)) {
|
if (this.update(wrapper)) {
|
||||||
dictCodeToNameConverter.convertCodeToName(entity, CODE_TO_NAME_META_LIST);
|
dictCodeToNameConverter.convertCodeToName(entity, CODE_TO_NAME_META_LIST);
|
||||||
msOperationLogService.recordDeleteDetailLog(stcd,TABLE_NAME, entity, source,CODE_TO_NAME_META_LIST); count++;
|
msOperationLogService.recordDeleteDetailLog(entity.getStcd(),TABLE_NAME, entity, source,CODE_TO_NAME_META_LIST); count++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return count > 0;
|
return count > 0;
|
||||||
|
|||||||
@ -119,7 +119,7 @@ public class SdWeBHServiceImpl extends ServiceImpl<SdWeBHMapper, SdWeBH> impleme
|
|||||||
SdWeBH entity = this.getById(stcd);
|
SdWeBH entity = this.getById(stcd);
|
||||||
dictCodeToNameConverter.convertCodeToName(entity, CODE_TO_NAME_META_LIST);
|
dictCodeToNameConverter.convertCodeToName(entity, CODE_TO_NAME_META_LIST);
|
||||||
if (this.removeById(stcd)) {
|
if (this.removeById(stcd)) {
|
||||||
msOperationLogService.recordDeleteDetailLog(stcd, TABLE_NAME, entity, source, CODE_TO_NAME_META_LIST);
|
msOperationLogService.recordDeleteDetailLog(entity.getStcd(), TABLE_NAME, entity, source, CODE_TO_NAME_META_LIST);
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -122,7 +122,7 @@ public class SdWqBHServiceImpl extends ServiceImpl<SdWqBHMapper, SdWqBH> impleme
|
|||||||
wrapper.set(SdWqBH::getDeleteTime, new Date());
|
wrapper.set(SdWqBH::getDeleteTime, new Date());
|
||||||
if (this.update(wrapper)) {
|
if (this.update(wrapper)) {
|
||||||
dictCodeToNameConverter.convertCodeToName(entity, CODE_TO_NAME_META_LIST);
|
dictCodeToNameConverter.convertCodeToName(entity, CODE_TO_NAME_META_LIST);
|
||||||
msOperationLogService.recordDeleteDetailLog(stcd,TABLE_NAME, entity, source, CODE_TO_NAME_META_LIST); count++;
|
msOperationLogService.recordDeleteDetailLog(entity.getStcd(),TABLE_NAME, entity, source, CODE_TO_NAME_META_LIST); count++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return count > 0;
|
return count > 0;
|
||||||
|
|||||||
@ -124,7 +124,7 @@ public class SdWtBHServiceImpl extends ServiceImpl<SdWtBHMapper, SdWtBH> impleme
|
|||||||
wrapper.set(SdWtBH::getDeleteTime, new Date());
|
wrapper.set(SdWtBH::getDeleteTime, new Date());
|
||||||
if (this.update(wrapper)) {
|
if (this.update(wrapper)) {
|
||||||
dictCodeToNameConverter.convertCodeToName(entity, CODE_TO_NAME_META_LIST);
|
dictCodeToNameConverter.convertCodeToName(entity, CODE_TO_NAME_META_LIST);
|
||||||
msOperationLogService.recordDeleteDetailLog(stcd,TABLE_NAME, entity, source, CODE_TO_NAME_META_LIST);
|
msOperationLogService.recordDeleteDetailLog(entity.getStcd(),TABLE_NAME, entity, source, CODE_TO_NAME_META_LIST);
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -47,6 +47,7 @@ import com.yfd.platform.qgc_base.mapper.MsOperationLogDetailMapper;
|
|||||||
import com.yfd.platform.qgc_base.mapper.MsOperationLogMapper;
|
import com.yfd.platform.qgc_base.mapper.MsOperationLogMapper;
|
||||||
import com.yfd.platform.qgc_env.wq.entity.vo.MsWarnRuleDetailBVo;
|
import com.yfd.platform.qgc_env.wq.entity.vo.MsWarnRuleDetailBVo;
|
||||||
import com.yfd.platform.qgc_env.wt.utils.SiteAvoidanceUtils;
|
import com.yfd.platform.qgc_env.wt.utils.SiteAvoidanceUtils;
|
||||||
|
import com.yfd.platform.utils.LogValueUtils;
|
||||||
import com.yfd.platform.utils.QgcQueryWrapperUtil;
|
import com.yfd.platform.utils.QgcQueryWrapperUtil;
|
||||||
import com.yfd.platform.utils.SecurityUtils;
|
import com.yfd.platform.utils.SecurityUtils;
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
@ -6845,7 +6846,7 @@ public class EngEqDataServiceImpl implements EngEqDataService {
|
|||||||
Object oldValue = beforeHour == null ? null : beforeHour.get(entry.getKey());
|
Object oldValue = beforeHour == null ? null : beforeHour.get(entry.getKey());
|
||||||
Object newValue = updateData.get(entry.getKey());
|
Object newValue = updateData.get(entry.getKey());
|
||||||
// 数值类型按数值大小比较,忽略精度差异(133.0000 == 133.00)
|
// 数值类型按数值大小比较,忽略精度差异(133.0000 == 133.00)
|
||||||
if (sameLogValue(oldValue, newValue)) {
|
if (LogValueUtils.sameLogValue(oldValue, newValue)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
details.add(buildQecDetail(null, QEC_HOUR_TABLE_NAME, stcd, column,
|
details.add(buildQecDetail(null, QEC_HOUR_TABLE_NAME, stcd, column,
|
||||||
@ -6865,24 +6866,6 @@ public class EngEqDataServiceImpl implements EngEqDataService {
|
|||||||
batchInsertQecLogDetails(details);
|
batchInsertQecLogDetails(details);
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean sameLogValue(Object oldValue, Object newValue) {
|
|
||||||
if (oldValue == null && newValue == null) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
if (oldValue == null || newValue == null) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
// BigDecimal/Double 等数值类型按数值大小比较,忽略精度差异(133.0000 == 133.00)
|
|
||||||
if (oldValue instanceof Number && newValue instanceof Number) {
|
|
||||||
try {
|
|
||||||
return new BigDecimal(oldValue.toString()).compareTo(new BigDecimal(newValue.toString())) == 0;
|
|
||||||
} catch (NumberFormatException e) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return StrUtil.equals(formatLogValue(oldValue), formatLogValue(newValue));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public boolean removeKendoByIds(BatchDeleteAo batchDeleteAo) {
|
public boolean removeKendoByIds(BatchDeleteAo batchDeleteAo) {
|
||||||
@ -7182,10 +7165,10 @@ public class EngEqDataServiceImpl implements EngEqDataService {
|
|||||||
detail.setStationCode(stationCode);
|
detail.setStationCode(stationCode);
|
||||||
detail.setFieldCode(fieldCode);
|
detail.setFieldCode(fieldCode);
|
||||||
detail.setFieldMeaning(QEC_FIELD_MEANING_MAP.getOrDefault(fieldCode, fieldCode));
|
detail.setFieldMeaning(QEC_FIELD_MEANING_MAP.getOrDefault(fieldCode, fieldCode));
|
||||||
detail.setOldValueCode(formatLogValue(oldValueCode));
|
detail.setOldValueCode(LogValueUtils.formatLogValue(oldValueCode));
|
||||||
detail.setOldValueName(formatLogValue(oldValueName));
|
detail.setOldValueName(LogValueUtils.formatLogValue(oldValueName));
|
||||||
detail.setNewValueCode(formatLogValue(newValueCode));
|
detail.setNewValueCode(LogValueUtils.formatLogValue(newValueCode));
|
||||||
detail.setNewValueName(formatLogValue(newValueName));
|
detail.setNewValueName(LogValueUtils.formatLogValue(newValueName));
|
||||||
detail.setRemark(remark);
|
detail.setRemark(remark);
|
||||||
return detail;
|
return detail;
|
||||||
}
|
}
|
||||||
@ -7203,7 +7186,7 @@ public class EngEqDataServiceImpl implements EngEqDataService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private Object resolveQecDisplayValue(String fieldCode, Object rawValue) {
|
private Object resolveQecDisplayValue(String fieldCode, Object rawValue) {
|
||||||
String text = formatLogValue(rawValue);
|
String text = LogValueUtils.formatLogValue(rawValue);
|
||||||
if (StrUtil.isBlank(text)) {
|
if (StrUtil.isBlank(text)) {
|
||||||
return rawValue;
|
return rawValue;
|
||||||
}
|
}
|
||||||
@ -7232,16 +7215,6 @@ public class EngEqDataServiceImpl implements EngEqDataService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private String formatLogValue(Object value) {
|
|
||||||
if (value == null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
if (value instanceof Date date) {
|
|
||||||
return DateUtil.formatDateTime(date);
|
|
||||||
}
|
|
||||||
return String.valueOf(value);
|
|
||||||
}
|
|
||||||
|
|
||||||
private Integer parseInteger(Object value) {
|
private Integer parseInteger(Object value) {
|
||||||
if (value == null) {
|
if (value == null) {
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
@ -4,8 +4,10 @@ import com.yfd.platform.annotation.Log;
|
|||||||
import com.yfd.platform.common.DataSourceRequest;
|
import com.yfd.platform.common.DataSourceRequest;
|
||||||
import com.yfd.platform.common.DataSourceResult;
|
import com.yfd.platform.common.DataSourceResult;
|
||||||
import com.yfd.platform.config.ResponseResult;
|
import com.yfd.platform.config.ResponseResult;
|
||||||
|
import com.yfd.platform.qgc_base.entity.vo.BatchDeleteByIdsAo;
|
||||||
import com.yfd.platform.qgc_env.fb.entity.vo.BreedStageVO;
|
import com.yfd.platform.qgc_env.fb.entity.vo.BreedStageVO;
|
||||||
import com.yfd.platform.qgc_env.fb.entity.vo.FbFishRunQgcDeleteParam;
|
import com.yfd.platform.qgc_env.fb.entity.vo.FbFishRunQgcDeleteParam;
|
||||||
|
import com.yfd.platform.qgc_env.fb.entity.vo.FbFishRunQgcOperateRequest;
|
||||||
import com.yfd.platform.qgc_env.fb.service.FbStationService;
|
import com.yfd.platform.qgc_env.fb.service.FbStationService;
|
||||||
import io.swagger.v3.oas.annotations.Parameter;
|
import io.swagger.v3.oas.annotations.Parameter;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
@ -214,6 +216,12 @@ public class FbStationController {
|
|||||||
return ResponseResult.successData(fbStationService.getFishRunQgcKendoListCust(dataSourceRequest));
|
return ResponseResult.successData(fbStationService.getFishRunQgcKendoListCust(dataSourceRequest));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PostMapping("/fishrun/qgc/detail/GetKendoListCust")
|
||||||
|
@Operation(summary = "全过程鱼类放鱼数据明细(细粒度,按站点+年份+鱼种下钻)")
|
||||||
|
public ResponseResult getFishRunQgcDetailKendoListCust(@RequestBody DataSourceRequest dataSourceRequest) {
|
||||||
|
return ResponseResult.successData(fbStationService.getFishRunQgcDetailKendoListCust(dataSourceRequest));
|
||||||
|
}
|
||||||
|
|
||||||
@Log(module = "鱼类增殖站模块", value = "删除全过程鱼类放鱼数据")
|
@Log(module = "鱼类增殖站模块", value = "删除全过程鱼类放鱼数据")
|
||||||
@PostMapping("/fishrun/qgc/removeFishRunQgcData")
|
@PostMapping("/fishrun/qgc/removeFishRunQgcData")
|
||||||
@Operation(summary = "删除全过程鱼类放鱼数据(按站点+年份+鱼种)")
|
@Operation(summary = "删除全过程鱼类放鱼数据(按站点+年份+鱼种)")
|
||||||
@ -222,6 +230,25 @@ public class FbStationController {
|
|||||||
return ResponseResult.success();
|
return ResponseResult.success();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Log(module = "鱼类增殖站模块", value = "删除全过程鱼类放鱼明细数据")
|
||||||
|
@PostMapping("/fishrun/qgc/removeFishRunQgcDetailData")
|
||||||
|
@Operation(summary = "删除全过程鱼类放鱼明细数据(按明细ID批量)")
|
||||||
|
public ResponseResult removeFishRunQgcDetailData(@RequestBody BatchDeleteByIdsAo batchDeleteByIdsAo) {
|
||||||
|
fbStationService.removeFishRunQgcDetailData(batchDeleteByIdsAo);
|
||||||
|
return ResponseResult.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Log(module = "鱼类增殖站模块", value = "修改全过程鱼类放鱼明细数据")
|
||||||
|
@PostMapping("/fishrun/qgc/updateFishRunQgcDetailData")
|
||||||
|
@Operation(summary = "修改全过程鱼类放鱼明细数据(按明细ID)")
|
||||||
|
public ResponseResult updateFishRunQgcDetailData(@RequestBody FbFishRunQgcOperateRequest operateRequest) {
|
||||||
|
fbStationService.updateFishRunQgcDetailData(
|
||||||
|
operateRequest == null ? null : operateRequest.getUpdateData(),
|
||||||
|
operateRequest == null ? null : operateRequest.getSource()
|
||||||
|
);
|
||||||
|
return ResponseResult.success();
|
||||||
|
}
|
||||||
|
|
||||||
@PostMapping("/fishType/GetKendoListCust")
|
@PostMapping("/fishType/GetKendoListCust")
|
||||||
@Operation(summary = "增殖站鱼种完成情况统计")
|
@Operation(summary = "增殖站鱼种完成情况统计")
|
||||||
public ResponseResult getFishTypeKendoListCust(@RequestBody DataSourceRequest dataSourceRequest) {
|
public ResponseResult getFishTypeKendoListCust(@RequestBody DataSourceRequest dataSourceRequest) {
|
||||||
|
|||||||
@ -0,0 +1,69 @@
|
|||||||
|
package com.yfd.platform.qgc_env.fb.entity.vo;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 全过程鱼类放鱼数据明细(细粒度),对应 SD_RPIMNFISH_R 明细行。
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Schema(description = "全过程鱼类放鱼数据明细")
|
||||||
|
public class FbFishRunQgcDetailVo {
|
||||||
|
|
||||||
|
@Schema(description = "明细ID (SD_RPIMNFISH_R.ID)")
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
@Schema(description = "放流主表ID (SD_ENGFR_R.ID)")
|
||||||
|
private String rpimnId;
|
||||||
|
|
||||||
|
@Schema(description = "电站站码")
|
||||||
|
private String stcd;
|
||||||
|
|
||||||
|
@Schema(description = "电站名称")
|
||||||
|
private String stnm;
|
||||||
|
|
||||||
|
@Schema(description = "放流年份 yyyy")
|
||||||
|
private String flyr;
|
||||||
|
|
||||||
|
@Schema(description = "鱼种类")
|
||||||
|
private String ftp;
|
||||||
|
|
||||||
|
@Schema(description = "鱼种类名称")
|
||||||
|
private String ftpName;
|
||||||
|
|
||||||
|
@Schema(description = "平均长度")
|
||||||
|
private BigDecimal fsZ;
|
||||||
|
|
||||||
|
@Schema(description = "平均体重")
|
||||||
|
private BigDecimal fwet;
|
||||||
|
|
||||||
|
@Schema(description = "计划放殖鱼数量")
|
||||||
|
private Long fcnt;
|
||||||
|
|
||||||
|
@Schema(description = "标记类型")
|
||||||
|
private String tagte;
|
||||||
|
|
||||||
|
@Schema(description = "标记数量")
|
||||||
|
private Long tagcnt;
|
||||||
|
|
||||||
|
@Schema(description = "鱼龄")
|
||||||
|
private String fage;
|
||||||
|
|
||||||
|
@Schema(description = "鱼类档案ID")
|
||||||
|
private String fid;
|
||||||
|
|
||||||
|
@Schema(description = "保护等级")
|
||||||
|
private String protectlvl;
|
||||||
|
|
||||||
|
@Schema(description = "亲本来源")
|
||||||
|
private String fa;
|
||||||
|
|
||||||
|
@Schema(description = "备注")
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
@Schema(description = "放流时间")
|
||||||
|
private Date tm;
|
||||||
|
}
|
||||||
@ -0,0 +1,24 @@
|
|||||||
|
package com.yfd.platform.qgc_env.fb.entity.vo;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 全过程鱼类放鱼明细数据操作请求
|
||||||
|
* <p>updateData: 修改数据,其中 id 为定位条件,其余 key 对应明细表可修改字段</p>
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Schema(description = "全过程鱼类放鱼明细数据操作请求")
|
||||||
|
public class FbFishRunQgcOperateRequest implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@Schema(description = "数据来源")
|
||||||
|
private String source;
|
||||||
|
|
||||||
|
@Schema(description = "修改数据")
|
||||||
|
private Map<String, Object> updateData;
|
||||||
|
}
|
||||||
@ -2,6 +2,7 @@ package com.yfd.platform.qgc_env.fb.service;
|
|||||||
|
|
||||||
import com.yfd.platform.common.DataSourceRequest;
|
import com.yfd.platform.common.DataSourceRequest;
|
||||||
import com.yfd.platform.common.DataSourceResult;
|
import com.yfd.platform.common.DataSourceResult;
|
||||||
|
import com.yfd.platform.qgc_base.entity.vo.BatchDeleteByIdsAo;
|
||||||
import com.yfd.platform.qgc_env.fb.entity.vo.*;
|
import com.yfd.platform.qgc_env.fb.entity.vo.*;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -21,6 +22,13 @@ public interface FbStationService {
|
|||||||
|
|
||||||
DataSourceResult<FbFishRunQgcVo> getFishRunQgcKendoListCust(DataSourceRequest dataSourceRequest);
|
DataSourceResult<FbFishRunQgcVo> getFishRunQgcKendoListCust(DataSourceRequest dataSourceRequest);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询全过程鱼类放鱼数据明细(细粒度),用于聚合行下钻查看底层放鱼明细。
|
||||||
|
*
|
||||||
|
* @param dataSourceRequest 支持 stcd/flyr/ftp 等过滤条件与分页排序
|
||||||
|
*/
|
||||||
|
DataSourceResult<FbFishRunQgcDetailVo> getFishRunQgcDetailKendoListCust(DataSourceRequest dataSourceRequest);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量删除全过程鱼类放鱼数据(按 站点+年份+鱼种 维度逻辑删除 SD_RPIMNFISH_R 明细)
|
* 批量删除全过程鱼类放鱼数据(按 站点+年份+鱼种 维度逻辑删除 SD_RPIMNFISH_R 明细)
|
||||||
*
|
*
|
||||||
@ -28,6 +36,21 @@ public interface FbStationService {
|
|||||||
*/
|
*/
|
||||||
boolean removeFishRunQgcData(List<FbFishRunQgcDeleteParam> params);
|
boolean removeFishRunQgcData(List<FbFishRunQgcDeleteParam> params);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 按明细ID批量逻辑删除全过程鱼类放鱼数据,并记录操作日志。
|
||||||
|
*
|
||||||
|
* @param batchDeleteByIdsAo 删除参数(ids + source)
|
||||||
|
*/
|
||||||
|
boolean removeFishRunQgcDetailData(BatchDeleteByIdsAo batchDeleteByIdsAo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改全过程鱼类放鱼明细数据(按明细ID定位),并记录操作日志。
|
||||||
|
*
|
||||||
|
* @param updateData 修改数据,id 为定位条件,其余 key 为可修改字段
|
||||||
|
* @param source 数据来源
|
||||||
|
*/
|
||||||
|
boolean updateFishRunQgcDetailData(Map<String, Object> updateData, String source);
|
||||||
|
|
||||||
DataSourceResult<FbFishTypeFinishVo> getFishTypeKendoListCust(DataSourceRequest dataSourceRequest);
|
DataSourceResult<FbFishTypeFinishVo> getFishTypeKendoListCust(DataSourceRequest dataSourceRequest);
|
||||||
|
|
||||||
DataSourceResult<FbFishTypeStcdVo> getFishTypeStcdList(DataSourceRequest dataSourceRequest);
|
DataSourceResult<FbFishTypeStcdVo> getFishTypeStcdList(DataSourceRequest dataSourceRequest);
|
||||||
|
|||||||
@ -11,6 +11,8 @@ import com.yfd.platform.common.Group;
|
|||||||
import com.yfd.platform.common.GroupHelper;
|
import com.yfd.platform.common.GroupHelper;
|
||||||
import com.yfd.platform.common.GroupingInfo;
|
import com.yfd.platform.common.GroupingInfo;
|
||||||
import com.yfd.platform.common.MicroservicDynamicSQLMapper;
|
import com.yfd.platform.common.MicroservicDynamicSQLMapper;
|
||||||
|
import com.yfd.platform.common.exception.BizException;
|
||||||
|
import com.yfd.platform.qgc_base.entity.vo.BatchDeleteByIdsAo;
|
||||||
import com.yfd.platform.qgc_env.fb.entity.vo.*;
|
import com.yfd.platform.qgc_env.fb.entity.vo.*;
|
||||||
import com.yfd.platform.qgc_env.fb.service.FbStationService;
|
import com.yfd.platform.qgc_env.fb.service.FbStationService;
|
||||||
import com.yfd.platform.qgc_env.wt.utils.SiteAvoidanceUtils;
|
import com.yfd.platform.qgc_env.wt.utils.SiteAvoidanceUtils;
|
||||||
@ -18,6 +20,7 @@ import com.yfd.platform.qgc_base.domain.MsOperationLog;
|
|||||||
import com.yfd.platform.qgc_base.domain.MsOperationLogDetail;
|
import com.yfd.platform.qgc_base.domain.MsOperationLogDetail;
|
||||||
import com.yfd.platform.qgc_base.mapper.MsOperationLogDetailMapper;
|
import com.yfd.platform.qgc_base.mapper.MsOperationLogDetailMapper;
|
||||||
import com.yfd.platform.qgc_base.mapper.MsOperationLogMapper;
|
import com.yfd.platform.qgc_base.mapper.MsOperationLogMapper;
|
||||||
|
import com.yfd.platform.utils.LogValueUtils;
|
||||||
import com.yfd.platform.utils.QgcQueryWrapperUtil;
|
import com.yfd.platform.utils.QgcQueryWrapperUtil;
|
||||||
import com.yfd.platform.utils.SecurityUtils;
|
import com.yfd.platform.utils.SecurityUtils;
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
@ -63,6 +66,25 @@ public class FbStationServiceImpl implements FbStationService {
|
|||||||
FISH_RUN_FIELD_MEANING_MAP.put("REMARK", "备注");
|
FISH_RUN_FIELD_MEANING_MAP.put("REMARK", "备注");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 全过程鱼类放鱼明细可修改字段映射(前端入参 key -> 数据库列)
|
||||||
|
*/
|
||||||
|
private static final LinkedHashMap<String, String> FISH_RUN_UPDATE_COLUMN_MAP = new LinkedHashMap<>();
|
||||||
|
|
||||||
|
static {
|
||||||
|
FISH_RUN_UPDATE_COLUMN_MAP.put("ftp", "FTP");
|
||||||
|
FISH_RUN_UPDATE_COLUMN_MAP.put("fsZ", "FSZ");
|
||||||
|
FISH_RUN_UPDATE_COLUMN_MAP.put("fwet", "FWET");
|
||||||
|
FISH_RUN_UPDATE_COLUMN_MAP.put("fcnt", "FCNT");
|
||||||
|
FISH_RUN_UPDATE_COLUMN_MAP.put("tagte", "TAGTE");
|
||||||
|
FISH_RUN_UPDATE_COLUMN_MAP.put("tagcnt", "TAGCNT");
|
||||||
|
FISH_RUN_UPDATE_COLUMN_MAP.put("fage", "FAGE");
|
||||||
|
FISH_RUN_UPDATE_COLUMN_MAP.put("fid", "FID");
|
||||||
|
FISH_RUN_UPDATE_COLUMN_MAP.put("protectlvl", "PROTECTLVL");
|
||||||
|
FISH_RUN_UPDATE_COLUMN_MAP.put("fa", "FA");
|
||||||
|
FISH_RUN_UPDATE_COLUMN_MAP.put("remark", "REMARK");
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<YearRpStatisticsVo> getYearRpStatistics(String year) {
|
public List<YearRpStatisticsVo> getYearRpStatistics(String year) {
|
||||||
Map<String, Object> paramMap = new HashMap<>();
|
Map<String, Object> paramMap = new HashMap<>();
|
||||||
@ -195,6 +217,74 @@ public class FbStationServiceImpl implements FbStationService {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public DataSourceResult<FbFishRunQgcDetailVo> getFishRunQgcDetailKendoListCust(DataSourceRequest dataSourceRequest) {
|
||||||
|
DataSourceLoadOptionsBase loadOptions = dataSourceRequest == null ? null : dataSourceRequest.toDevRequest();
|
||||||
|
String stcd = loadOptions == null ? null : QgcQueryWrapperUtil.getFilterFieldValue(loadOptions, "stcd");
|
||||||
|
String flyr = loadOptions == null ? null : QgcQueryWrapperUtil.getFilterFieldValue(loadOptions, "flyr");
|
||||||
|
String ftp = loadOptions == null ? null : QgcQueryWrapperUtil.getFilterFieldValue(loadOptions, "ftp");
|
||||||
|
|
||||||
|
Map<String, Object> paramMap = new HashMap<>();
|
||||||
|
StringBuilder sql = new StringBuilder();
|
||||||
|
sql.append("SELECT det.ID AS id, ")
|
||||||
|
.append("run.ID AS rpimnId, ")
|
||||||
|
.append("run.STCD AS stcd, ")
|
||||||
|
.append("eng.ENNM AS stnm, ")
|
||||||
|
.append("TO_CHAR(run.TM, 'YYYY') AS flyr, ")
|
||||||
|
.append("det.FTP AS ftp, ")
|
||||||
|
.append(buildFishNameExpr("det.FTP")).append(" AS ftpName, ")
|
||||||
|
.append("det.FSZ AS fsZ, ")
|
||||||
|
.append("det.FWET AS fwet, ")
|
||||||
|
.append("det.FCNT AS fcnt, ")
|
||||||
|
.append("det.TAGTE AS tagte, ")
|
||||||
|
.append("det.TAGCNT AS tagcnt, ")
|
||||||
|
.append("det.FAGE AS fage, ")
|
||||||
|
.append("det.FID AS fid, ")
|
||||||
|
.append("det.PROTECTLVL AS protectlvl, ")
|
||||||
|
.append("det.FA AS fa, ")
|
||||||
|
.append("det.REMARK AS remark, ")
|
||||||
|
.append("run.TM AS tm ")
|
||||||
|
.append("FROM SD_RPIMNFISH_R det ")
|
||||||
|
.append("INNER JOIN SD_ENGFR_R run ON det.RPIMN_ID = run.ID AND NVL(run.IS_DELETED, 0) = 0 ")
|
||||||
|
.append("LEFT JOIN SD_ENGINFO_B_H eng ON eng.STCD = run.STCD AND NVL(eng.IS_DELETED, 0) = 0 ")
|
||||||
|
.append(buildFishJoinSql("det.FTP", "eng.HBRVCD"))
|
||||||
|
.append("WHERE NVL(det.IS_DELETED, 0) = 0 ");
|
||||||
|
if (StrUtil.isNotBlank(stcd)) {
|
||||||
|
paramMap.put("detailStcd", stcd);
|
||||||
|
sql.append("AND run.STCD = #{map.detailStcd} ");
|
||||||
|
}
|
||||||
|
if (StrUtil.isNotBlank(flyr)) {
|
||||||
|
paramMap.put("detailFlyr", flyr);
|
||||||
|
sql.append("AND TO_CHAR(run.TM, 'YYYY') = #{map.detailFlyr} ");
|
||||||
|
}
|
||||||
|
if (StrUtil.isNotBlank(ftp)) {
|
||||||
|
paramMap.put("detailFtp", ftp);
|
||||||
|
sql.append("AND det.FTP = #{map.detailFtp} ");
|
||||||
|
}
|
||||||
|
String filterSql = buildFishRunQgcDetailFilterCondition(
|
||||||
|
dataSourceRequest == null ? null : dataSourceRequest.getFilter(),
|
||||||
|
paramMap,
|
||||||
|
new int[]{0}
|
||||||
|
);
|
||||||
|
if (StrUtil.isNotBlank(filterSql)) {
|
||||||
|
sql.append(" AND ").append(filterSql).append(" ");
|
||||||
|
}
|
||||||
|
sql.append(buildFishRunQgcDetailOrderBySql(dataSourceRequest == null ? null : dataSourceRequest.getSort()));
|
||||||
|
|
||||||
|
Page<?> page = loadOptions == null ? null : QgcQueryWrapperUtil.buildPage(loadOptions, loadOptions.getSkip(), loadOptions.getTake());
|
||||||
|
List<FbFishRunQgcDetailVo> list = microservicDynamicSQLMapper.pageAllListWithResultType(
|
||||||
|
page,
|
||||||
|
sql.toString(),
|
||||||
|
paramMap,
|
||||||
|
FbFishRunQgcDetailVo.class
|
||||||
|
);
|
||||||
|
DataSourceResult<FbFishRunQgcDetailVo> result = new DataSourceResult<>();
|
||||||
|
result.setData(list);
|
||||||
|
result.setTotal(page != null ? page.getTotal() : list.size());
|
||||||
|
result.setAggregates(new HashMap<>());
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public boolean removeFishRunQgcData(List<FbFishRunQgcDeleteParam> params) {
|
public boolean removeFishRunQgcData(List<FbFishRunQgcDeleteParam> params) {
|
||||||
@ -224,19 +314,167 @@ public class FbStationServiceImpl implements FbStationService {
|
|||||||
" AND TO_CHAR(run.TM, 'YYYY') = ? )",
|
" AND TO_CHAR(run.TM, 'YYYY') = ? )",
|
||||||
resolveLogOperator(), param.getFtp(), param.getStcd(), param.getFlyr()
|
resolveLogOperator(), param.getFtp(), param.getStcd(), param.getFlyr()
|
||||||
);
|
);
|
||||||
recordFishRunDeleteLog(beforeRows, param, deleteCount);
|
recordFishRunDeleteLog(beforeRows, String.format("删除全过程鱼类放鱼数据(站点:%s,年份:%s,删除条数:%d)",
|
||||||
|
param.getStcd(), param.getFlyr(), deleteCount),null, deleteCount);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public boolean removeFishRunQgcDetailData(BatchDeleteByIdsAo batchDeleteByIdsAo) {
|
||||||
|
List<String> ids = batchDeleteByIdsAo.getIds();
|
||||||
|
if (CollUtil.isEmpty(ids)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
List<String> distinctIds = ids.stream()
|
||||||
|
.filter(StrUtil::isNotBlank)
|
||||||
|
.distinct()
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
if (distinctIds.isEmpty()) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
// 1. 查询删除前的明细行(含站点等信息, 用于记录日志)
|
||||||
|
List<Map<String, Object>> beforeRows = queryFishRunDetailRowsByIds(distinctIds);
|
||||||
|
// 2. 分批逻辑删除(ID IN, 防止超过数据库 IN 限制)
|
||||||
|
int deleteCount = 0;
|
||||||
|
for (List<String> part : CollUtil.split(distinctIds, 500)) {
|
||||||
|
deleteCount += batchSoftDeleteFishRunDetail(part);
|
||||||
|
}
|
||||||
|
// 3. 记录删除日志(每条明细一条主日志, 子日志挂对应主日志)
|
||||||
|
recordFishRunDeleteLog(beforeRows, String.format("删除全过程鱼类放鱼数据(明细删除,删除条数:%d)", deleteCount),batchDeleteByIdsAo.getSource(), deleteCount);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public boolean updateFishRunQgcDetailData(Map<String, Object> updateData, String source) {
|
||||||
|
if (updateData == null || updateData.isEmpty()) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
String id = asString(updateData.get("id"));
|
||||||
|
if (StrUtil.isBlank(id)) {
|
||||||
|
throw new BizException("明细ID不能为空");
|
||||||
|
}
|
||||||
|
// 1. 查询修改前的明细行(用于记录日志)
|
||||||
|
Map<String, Object> beforeRow = querySingleFishRunDetailRow(id);
|
||||||
|
if (beforeRow == null || beforeRow.isEmpty()) {
|
||||||
|
throw new BizException("放鱼明细不存在或已被删除");
|
||||||
|
}
|
||||||
|
// 2. 更新允许修改的字段
|
||||||
|
updateFishRunDetailData(updateData, id);
|
||||||
|
// 3. 记录修改日志(只记录真正发生变化的字段)
|
||||||
|
recordFishRunUpdateLog(beforeRow, updateData, source);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
private Map<String, Object> querySingleFishRunDetailRow(String id) {
|
||||||
|
List<Map<String, Object>> rows = queryFishRunDetailRowsByIds(Collections.singletonList(id));
|
||||||
|
return rows.isEmpty() ? new HashMap<>() : rows.get(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void updateFishRunDetailData(Map<String, Object> updateData, String id) {
|
||||||
|
List<String> setClauses = new ArrayList<>();
|
||||||
|
List<Object> params = new ArrayList<>();
|
||||||
|
for (Map.Entry<String, String> entry : FISH_RUN_UPDATE_COLUMN_MAP.entrySet()) {
|
||||||
|
if (!updateData.containsKey(entry.getKey())) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
setClauses.add(entry.getValue() + " = ?");
|
||||||
|
params.add(updateData.get(entry.getKey()));
|
||||||
|
}
|
||||||
|
if (setClauses.isEmpty()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
String sql = "UPDATE SD_RPIMNFISH_R SET " + String.join(", ", setClauses)
|
||||||
|
+ " WHERE ID = ? AND NVL(IS_DELETED, 0) = 0";
|
||||||
|
params.add(id);
|
||||||
|
int updated = jdbcTemplate.update(sql, params.toArray());
|
||||||
|
if (updated == 0) {
|
||||||
|
throw new BizException("放鱼明细不存在或已被删除");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void recordFishRunUpdateLog(Map<String, Object> beforeRow,
|
||||||
|
Map<String, Object> updateData,
|
||||||
|
String source) {
|
||||||
|
if (updateData == null || updateData.isEmpty()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
String recordId = asString(beforeRow.get("ID"));
|
||||||
|
String stcd = asString(beforeRow.get("STCD"));
|
||||||
|
List<MsOperationLogDetail> details = new ArrayList<>();
|
||||||
|
for (Map.Entry<String, String> entry : FISH_RUN_UPDATE_COLUMN_MAP.entrySet()) {
|
||||||
|
if (!updateData.containsKey(entry.getKey())) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
String column = entry.getValue();
|
||||||
|
Object oldValue = beforeRow.get(column);
|
||||||
|
Object newValue = updateData.get(entry.getKey());
|
||||||
|
// 数值类型按数值大小比较,忽略精度差异(133.0000 == 133.00)
|
||||||
|
if (LogValueUtils.sameLogValue(oldValue, newValue)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
MsOperationLogDetail detail = new MsOperationLogDetail();
|
||||||
|
detail.setTableName(FISH_RUN_DETAIL_TABLE_NAME);
|
||||||
|
detail.setStationCode(stcd);
|
||||||
|
detail.setFieldCode(column);
|
||||||
|
detail.setFieldMeaning(FISH_RUN_FIELD_MEANING_MAP.getOrDefault(column, column));
|
||||||
|
detail.setOldValueCode(formatFishRunLogValue(oldValue));
|
||||||
|
detail.setOldValueName(formatFishRunLogValue(oldValue));
|
||||||
|
detail.setNewValueCode(formatFishRunLogValue(newValue));
|
||||||
|
detail.setNewValueName(formatFishRunLogValue(newValue));
|
||||||
|
detail.setRemark("修改字段值");
|
||||||
|
details.add(detail);
|
||||||
|
}
|
||||||
|
if (details.isEmpty()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
MsOperationLog mainLog = new MsOperationLog();
|
||||||
|
mainLog.setOperator(resolveLogOperator());
|
||||||
|
mainLog.setOperationType("02");
|
||||||
|
mainLog.setRecordId(recordId);
|
||||||
|
mainLog.setOperateTime(new Date());
|
||||||
|
mainLog.setTableName(FISH_RUN_DETAIL_TABLE_NAME);
|
||||||
|
mainLog.setSource(StrUtil.trimToNull(source));
|
||||||
|
mainLog.setRemark("修改全过程鱼类放鱼数据(明细ID:" + recordId + ")");
|
||||||
|
msOperationLogMapper.insert(mainLog);
|
||||||
|
for (MsOperationLogDetail detail : details) {
|
||||||
|
detail.setMainId(mainLog.getId());
|
||||||
|
msOperationLogDetailMapper.insert(detail);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private List<Map<String, Object>> queryFishRunDetailRows(FbFishRunQgcDeleteParam param) {
|
private List<Map<String, Object>> queryFishRunDetailRows(FbFishRunQgcDeleteParam param) {
|
||||||
String sql = "SELECT det.ID, det.RPIMN_ID, det.FTP, det.FSZ, det.FWET, det.FCNT, " +
|
String sql = "SELECT det.ID, det.RPIMN_ID, run.STCD, det.FTP, det.FSZ, det.FWET, det.FCNT, " +
|
||||||
"det.TAGTE, det.TAGCNT, det.FAGE, det.FID, det.PROTECTLVL, det.FA, det.REMARK " +
|
"det.TAGTE, det.TAGCNT, det.FAGE, det.FID, det.PROTECTLVL, det.FA, det.REMARK " +
|
||||||
"FROM SD_RPIMNFISH_R det " +
|
"FROM SD_RPIMNFISH_R det " +
|
||||||
"INNER JOIN SD_ENGFR_R run ON det.RPIMN_ID = run.ID AND NVL(run.IS_DELETED, 0) = 0 " +
|
"INNER JOIN SD_ENGFR_R run ON det.RPIMN_ID = run.ID AND NVL(run.IS_DELETED, 0) = 0 " +
|
||||||
"WHERE NVL(det.IS_DELETED, 0) = 0 " +
|
"WHERE NVL(det.IS_DELETED, 0) = 0 " +
|
||||||
" AND det.FTP = ? AND run.STCD = ? AND TO_CHAR(run.TM, 'YYYY') = ?";
|
" AND det.FTP = ? AND run.STCD = ? AND TO_CHAR(run.TM, 'YYYY') = ?";
|
||||||
List<Map<String, Object>> rows = jdbcTemplate.queryForList(sql, param.getFtp(), param.getStcd(), param.getFlyr());
|
return queryFishRunDetailRowsInternal(sql, param.getFtp(), param.getStcd(), param.getFlyr());
|
||||||
|
}
|
||||||
|
|
||||||
|
private List<Map<String, Object>> queryFishRunDetailRowsByIds(List<String> ids) {
|
||||||
|
StringBuilder sql = new StringBuilder();
|
||||||
|
sql.append("SELECT det.ID, det.RPIMN_ID, run.STCD, det.FTP, det.FSZ, det.FWET, det.FCNT, ")
|
||||||
|
.append("det.TAGTE, det.TAGCNT, det.FAGE, det.FID, det.PROTECTLVL, det.FA, det.REMARK ")
|
||||||
|
.append("FROM SD_RPIMNFISH_R det ")
|
||||||
|
.append("INNER JOIN SD_ENGFR_R run ON det.RPIMN_ID = run.ID AND NVL(run.IS_DELETED, 0) = 0 ")
|
||||||
|
.append("WHERE NVL(det.IS_DELETED, 0) = 0 ")
|
||||||
|
.append(" AND det.ID IN (");
|
||||||
|
for (int i = 0; i < ids.size(); i++) {
|
||||||
|
if (i > 0) {
|
||||||
|
sql.append(", ");
|
||||||
|
}
|
||||||
|
sql.append("?");
|
||||||
|
}
|
||||||
|
sql.append(")");
|
||||||
|
return queryFishRunDetailRowsInternal(sql.toString(), ids.toArray());
|
||||||
|
}
|
||||||
|
|
||||||
|
private List<Map<String, Object>> queryFishRunDetailRowsInternal(String sql, Object... args) {
|
||||||
|
List<Map<String, Object>> rows = jdbcTemplate.queryForList(sql, args);
|
||||||
List<Map<String, Object>> normalized = new ArrayList<>();
|
List<Map<String, Object>> normalized = new ArrayList<>();
|
||||||
for (Map<String, Object> row : rows) {
|
for (Map<String, Object> row : rows) {
|
||||||
normalized.add(normalizeFishRunLogRow(row));
|
normalized.add(normalizeFishRunLogRow(row));
|
||||||
@ -244,6 +482,28 @@ public class FbStationServiceImpl implements FbStationService {
|
|||||||
return normalized;
|
return normalized;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private int batchSoftDeleteFishRunDetail(List<String> ids) {
|
||||||
|
if (CollUtil.isEmpty(ids)) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
StringBuilder sql = new StringBuilder();
|
||||||
|
sql.append("UPDATE SD_RPIMNFISH_R det ")
|
||||||
|
.append("SET det.IS_DELETED = 1, det.DELETE_USER = ?, det.DELETE_TIME = SYSDATE ")
|
||||||
|
.append("WHERE NVL(det.IS_DELETED, 0) = 0 ")
|
||||||
|
.append(" AND det.ID IN (");
|
||||||
|
List<Object> params = new ArrayList<>();
|
||||||
|
params.add(resolveLogOperator());
|
||||||
|
for (int i = 0; i < ids.size(); i++) {
|
||||||
|
if (i > 0) {
|
||||||
|
sql.append(", ");
|
||||||
|
}
|
||||||
|
sql.append("?");
|
||||||
|
params.add(ids.get(i));
|
||||||
|
}
|
||||||
|
sql.append(")");
|
||||||
|
return jdbcTemplate.update(sql.toString(), params.toArray());
|
||||||
|
}
|
||||||
|
|
||||||
private Map<String, Object> normalizeFishRunLogRow(Map<String, Object> row) {
|
private Map<String, Object> normalizeFishRunLogRow(Map<String, Object> row) {
|
||||||
Map<String, Object> normalized = new LinkedHashMap<>();
|
Map<String, Object> normalized = new LinkedHashMap<>();
|
||||||
if (row == null || row.isEmpty()) {
|
if (row == null || row.isEmpty()) {
|
||||||
@ -255,19 +515,22 @@ public class FbStationServiceImpl implements FbStationService {
|
|||||||
return normalized;
|
return normalized;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void recordFishRunDeleteLog(List<Map<String, Object>> rows, FbFishRunQgcDeleteParam param, int deleteCount) {
|
private void recordFishRunDeleteLog(List<Map<String, Object>> rows, String remark,String source, int deleteCount) {
|
||||||
if (CollUtil.isEmpty(rows)) {
|
if (CollUtil.isEmpty(rows)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
List<MsOperationLogDetail> details = new ArrayList<>();
|
List<MsOperationLogDetail> details = new ArrayList<>();
|
||||||
for (Map<String, Object> row : rows) {
|
for (Map<String, Object> row : rows) {
|
||||||
|
String recordId = asString(row.get("ID"));
|
||||||
|
String stcd = asString(row.get("STCD"));
|
||||||
MsOperationLog mainLog = new MsOperationLog();
|
MsOperationLog mainLog = new MsOperationLog();
|
||||||
mainLog.setOperator(resolveLogOperator());
|
mainLog.setOperator(resolveLogOperator());
|
||||||
mainLog.setRecordId(String.valueOf(row.get("ID")));
|
mainLog.setRecordId(recordId);
|
||||||
mainLog.setOperateTime(new Date());
|
mainLog.setOperateTime(new Date());
|
||||||
|
mainLog.setSource(source);
|
||||||
|
mainLog.setOperationType("03");
|
||||||
mainLog.setTableName(FISH_RUN_DETAIL_TABLE_NAME);
|
mainLog.setTableName(FISH_RUN_DETAIL_TABLE_NAME);
|
||||||
mainLog.setRemark("删除全过程鱼类放鱼数据(站点:" + param.getStcd()
|
mainLog.setRemark(remark);
|
||||||
+ ",年份:" + param.getFlyr() + ",删除条数:" + deleteCount + ")");
|
|
||||||
msOperationLogMapper.insert(mainLog);
|
msOperationLogMapper.insert(mainLog);
|
||||||
for (Map.Entry<String, Object> entry : row.entrySet()) {
|
for (Map.Entry<String, Object> entry : row.entrySet()) {
|
||||||
if (StrUtil.isBlank(entry.getKey()) || entry.getValue() == null) {
|
if (StrUtil.isBlank(entry.getKey()) || entry.getValue() == null) {
|
||||||
@ -276,7 +539,7 @@ public class FbStationServiceImpl implements FbStationService {
|
|||||||
MsOperationLogDetail detail = new MsOperationLogDetail();
|
MsOperationLogDetail detail = new MsOperationLogDetail();
|
||||||
detail.setMainId(mainLog.getId());
|
detail.setMainId(mainLog.getId());
|
||||||
detail.setTableName(FISH_RUN_DETAIL_TABLE_NAME);
|
detail.setTableName(FISH_RUN_DETAIL_TABLE_NAME);
|
||||||
detail.setStationCode(param.getStcd());
|
detail.setStationCode(stcd);
|
||||||
detail.setFieldCode(entry.getKey());
|
detail.setFieldCode(entry.getKey());
|
||||||
detail.setFieldMeaning(FISH_RUN_FIELD_MEANING_MAP.getOrDefault(entry.getKey(), entry.getKey()));
|
detail.setFieldMeaning(FISH_RUN_FIELD_MEANING_MAP.getOrDefault(entry.getKey(), entry.getKey()));
|
||||||
detail.setOldValueCode(formatFishRunLogValue(entry.getValue()));
|
detail.setOldValueCode(formatFishRunLogValue(entry.getValue()));
|
||||||
@ -290,6 +553,10 @@ public class FbStationServiceImpl implements FbStationService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private String asString(Object value) {
|
||||||
|
return value == null ? null : String.valueOf(value);
|
||||||
|
}
|
||||||
|
|
||||||
private String resolveLogOperator() {
|
private String resolveLogOperator() {
|
||||||
try {
|
try {
|
||||||
return SecurityUtils.getCurrentUsername();
|
return SecurityUtils.getCurrentUsername();
|
||||||
@ -1412,6 +1679,184 @@ public class FbStationServiceImpl implements FbStationService {
|
|||||||
return " ORDER BY " + String.join(", ", orderByParts);
|
return " ORDER BY " + String.join(", ", orderByParts);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private String mapFishRunQgcDetailColumn(String field) {
|
||||||
|
if (StrUtil.isBlank(field)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return switch (field) {
|
||||||
|
case "id" -> "det.ID";
|
||||||
|
case "rpimnId" -> "det.RPIMN_ID";
|
||||||
|
case "stcd" -> "run.STCD";
|
||||||
|
case "stnm" -> "eng.ENNM";
|
||||||
|
case "flyr" -> "TO_CHAR(run.TM, 'YYYY')";
|
||||||
|
case "ftp" -> "det.FTP";
|
||||||
|
case "ftpName" -> buildFishNameExpr("det.FTP");
|
||||||
|
case "fsZ" -> "det.FSZ";
|
||||||
|
case "fwet" -> "det.FWET";
|
||||||
|
case "fcnt" -> "det.FCNT";
|
||||||
|
case "tagte" -> "det.TAGTE";
|
||||||
|
case "tagcnt" -> "det.TAGCNT";
|
||||||
|
case "fage" -> "det.FAGE";
|
||||||
|
case "fid" -> "det.FID";
|
||||||
|
case "protectlvl" -> "det.PROTECTLVL";
|
||||||
|
case "fa" -> "det.FA";
|
||||||
|
case "remark" -> "det.REMARK";
|
||||||
|
case "tm" -> "run.TM";
|
||||||
|
default -> null;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
private Object normalizeFishRunQgcDetailValue(String field, Object value) {
|
||||||
|
if (value == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
if ("fcnt".equals(field) || "tagcnt".equals(field)) {
|
||||||
|
try {
|
||||||
|
return Long.parseLong(String.valueOf(value).trim());
|
||||||
|
} catch (Exception ex) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
|
private String buildFishRunQgcDetailFilterCondition(DataSourceRequest.FilterDescriptor filter,
|
||||||
|
Map<String, Object> paramMap,
|
||||||
|
int[] indexHolder) {
|
||||||
|
if (filter == null) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
if (StrUtil.isNotBlank(filter.getField())) {
|
||||||
|
return buildFishRunQgcDetailLeafCondition(filter, paramMap, indexHolder);
|
||||||
|
}
|
||||||
|
if (CollUtil.isEmpty(filter.getFilters())) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
List<String> conditions = new ArrayList<>();
|
||||||
|
for (DataSourceRequest.FilterDescriptor child : filter.getFilters()) {
|
||||||
|
String childSql = buildFishRunQgcDetailFilterCondition(child, paramMap, indexHolder);
|
||||||
|
if (StrUtil.isNotBlank(childSql)) {
|
||||||
|
conditions.add("(" + childSql + ")");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (conditions.isEmpty()) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
String logic = "or".equalsIgnoreCase(filter.getLogic()) ? " OR " : " AND ";
|
||||||
|
return String.join(logic, conditions);
|
||||||
|
}
|
||||||
|
|
||||||
|
private String buildFishRunQgcDetailLeafCondition(DataSourceRequest.FilterDescriptor filter,
|
||||||
|
Map<String, Object> paramMap,
|
||||||
|
int[] indexHolder) {
|
||||||
|
// 这三个字段已在主 SQL 中作为下钻条件处理,避免重复拼接
|
||||||
|
if ("stcd".equalsIgnoreCase(filter.getField()) || "flyr".equalsIgnoreCase(filter.getField())
|
||||||
|
|| "ftp".equalsIgnoreCase(filter.getField())) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
String column = mapFishRunQgcDetailColumn(filter.getField());
|
||||||
|
if (StrUtil.isBlank(column)) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
String operator = StrUtil.blankToDefault(filter.getOperator(), "eq").toLowerCase();
|
||||||
|
if ("isnull".equals(operator)) {
|
||||||
|
return column + " IS NULL";
|
||||||
|
}
|
||||||
|
if ("isnotnull".equals(operator)) {
|
||||||
|
return column + " IS NOT NULL";
|
||||||
|
}
|
||||||
|
if ("isempty".equals(operator)) {
|
||||||
|
return "(" + column + " IS NULL OR " + column + " = '')";
|
||||||
|
}
|
||||||
|
if ("isnotempty".equals(operator)) {
|
||||||
|
return "(" + column + " IS NOT NULL AND " + column + " <> '')";
|
||||||
|
}
|
||||||
|
if ("in".equals(operator)) {
|
||||||
|
List<Object> values = normalizeQgcBsmfRValues(filter.getValue());
|
||||||
|
if (values.isEmpty()) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
List<String> placeholders = new ArrayList<>();
|
||||||
|
for (Object value : values) {
|
||||||
|
String key = "fishRunQgcDetailP" + indexHolder[0]++;
|
||||||
|
paramMap.put(key, normalizeFishRunQgcDetailValue(filter.getField(), value));
|
||||||
|
placeholders.add("#{map." + key + "}");
|
||||||
|
}
|
||||||
|
return column + " IN (" + String.join(", ", placeholders) + ")";
|
||||||
|
}
|
||||||
|
Object value = filter.getValue();
|
||||||
|
if (value == null) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
String key = "fishRunQgcDetailP" + indexHolder[0]++;
|
||||||
|
Object normalizedValue = normalizeFishRunQgcDetailValue(filter.getField(), value);
|
||||||
|
return switch (operator) {
|
||||||
|
case "eq" -> {
|
||||||
|
paramMap.put(key, normalizedValue);
|
||||||
|
yield column + " = #{map." + key + "}";
|
||||||
|
}
|
||||||
|
case "neq" -> {
|
||||||
|
paramMap.put(key, normalizedValue);
|
||||||
|
yield column + " <> #{map." + key + "}";
|
||||||
|
}
|
||||||
|
case "gt" -> {
|
||||||
|
paramMap.put(key, normalizedValue);
|
||||||
|
yield column + " > #{map." + key + "}";
|
||||||
|
}
|
||||||
|
case "gte" -> {
|
||||||
|
paramMap.put(key, normalizedValue);
|
||||||
|
yield column + " >= #{map." + key + "}";
|
||||||
|
}
|
||||||
|
case "lt" -> {
|
||||||
|
paramMap.put(key, normalizedValue);
|
||||||
|
yield column + " < #{map." + key + "}";
|
||||||
|
}
|
||||||
|
case "lte" -> {
|
||||||
|
paramMap.put(key, normalizedValue);
|
||||||
|
yield column + " <= #{map." + key + "}";
|
||||||
|
}
|
||||||
|
case "contains" -> {
|
||||||
|
paramMap.put(key, "%" + String.valueOf(normalizedValue).trim() + "%");
|
||||||
|
yield column + " LIKE #{map." + key + "}";
|
||||||
|
}
|
||||||
|
case "doesnotcontain" -> {
|
||||||
|
paramMap.put(key, "%" + String.valueOf(normalizedValue).trim() + "%");
|
||||||
|
yield column + " NOT LIKE #{map." + key + "}";
|
||||||
|
}
|
||||||
|
case "startswith" -> {
|
||||||
|
paramMap.put(key, String.valueOf(normalizedValue).trim() + "%");
|
||||||
|
yield column + " LIKE #{map." + key + "}";
|
||||||
|
}
|
||||||
|
case "endswith" -> {
|
||||||
|
paramMap.put(key, "%" + String.valueOf(normalizedValue).trim());
|
||||||
|
yield column + " LIKE #{map." + key + "}";
|
||||||
|
}
|
||||||
|
default -> "";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
private String buildFishRunQgcDetailOrderBySql(List<DataSourceRequest.SortDescriptor> sorts) {
|
||||||
|
if (CollUtil.isEmpty(sorts)) {
|
||||||
|
return " ORDER BY run.TM DESC, det.ID DESC";
|
||||||
|
}
|
||||||
|
List<String> orderByParts = new ArrayList<>();
|
||||||
|
for (DataSourceRequest.SortDescriptor sort : sorts) {
|
||||||
|
if (sort == null || StrUtil.isBlank(sort.getField())) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
String column = mapFishRunQgcDetailColumn(sort.getField());
|
||||||
|
if (StrUtil.isBlank(column)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
String direction = "desc".equalsIgnoreCase(sort.getDir()) ? "DESC" : "ASC";
|
||||||
|
orderByParts.add(column + " " + direction);
|
||||||
|
}
|
||||||
|
if (orderByParts.isEmpty()) {
|
||||||
|
return " ORDER BY run.TM DESC, det.ID DESC";
|
||||||
|
}
|
||||||
|
return " ORDER BY " + String.join(", ", orderByParts);
|
||||||
|
}
|
||||||
|
|
||||||
private Date[] parseFishRunFlyrRange(String flyrFilter) {
|
private Date[] parseFishRunFlyrRange(String flyrFilter) {
|
||||||
if (StrUtil.isBlank(flyrFilter)) {
|
if (StrUtil.isBlank(flyrFilter)) {
|
||||||
return new Date[]{null, null};
|
return new Date[]{null, null};
|
||||||
|
|||||||
@ -4168,7 +4168,7 @@ public class EnvWqDataServiceImpl implements EnvWqDataService {
|
|||||||
}
|
}
|
||||||
String recordId = ObjectUtil.isNotEmpty(beforeHour) && ObjectUtil.isNotEmpty(beforeHour.get("ID"))
|
String recordId = ObjectUtil.isNotEmpty(beforeHour) && ObjectUtil.isNotEmpty(beforeHour.get("ID"))
|
||||||
? beforeHour.get("ID").toString()
|
? beforeHour.get("ID").toString()
|
||||||
: null; MsOperationLog mainLog = buildWqMainLog(recordId,"修改水质小时数据", source);
|
: null; MsOperationLog mainLog = buildWqMainLog(recordId,"修改水质小时数据", source,"02");
|
||||||
msOperationLogMapper.insert(mainLog);
|
msOperationLogMapper.insert(mainLog);
|
||||||
for (MsOperationLogDetail detail : details) {
|
for (MsOperationLogDetail detail : details) {
|
||||||
detail.setMainId(mainLog.getId());
|
detail.setMainId(mainLog.getId());
|
||||||
@ -4184,7 +4184,7 @@ public class EnvWqDataServiceImpl implements EnvWqDataService {
|
|||||||
for (Map<String, Object> row : rows) {
|
for (Map<String, Object> row : rows) {
|
||||||
String stcd = asString(row.get("STCD"));
|
String stcd = asString(row.get("STCD"));
|
||||||
String recordId = asString(row.get("ID"));
|
String recordId = asString(row.get("ID"));
|
||||||
MsOperationLog mainLog = buildWqMainLog(recordId,remark, source);
|
MsOperationLog mainLog = buildWqMainLog(recordId,remark, source,"03");
|
||||||
msOperationLogMapper.insert(mainLog);
|
msOperationLogMapper.insert(mainLog);
|
||||||
for (Map.Entry<String, Object> entry : row.entrySet()) {
|
for (Map.Entry<String, Object> entry : row.entrySet()) {
|
||||||
String fieldCode = entry.getKey();
|
String fieldCode = entry.getKey();
|
||||||
@ -4203,11 +4203,12 @@ public class EnvWqDataServiceImpl implements EnvWqDataService {
|
|||||||
batchInsertWqLogDetails(details);
|
batchInsertWqLogDetails(details);
|
||||||
}
|
}
|
||||||
|
|
||||||
private MsOperationLog buildWqMainLog(String recordId,String remark, String source) {
|
private MsOperationLog buildWqMainLog(String recordId,String remark, String source,String operatorType) {
|
||||||
MsOperationLog log = new MsOperationLog();
|
MsOperationLog log = new MsOperationLog();
|
||||||
log.setOperator(resolveLogOperator());
|
log.setOperator(resolveLogOperator());
|
||||||
log.setRecordId(recordId);
|
log.setRecordId(recordId);
|
||||||
log.setOperateTime(new Date());
|
log.setOperateTime(new Date());
|
||||||
|
log.setOperationType(operatorType);
|
||||||
log.setTableName(WQ_HOUR_TABLE_NAME);
|
log.setTableName(WQ_HOUR_TABLE_NAME);
|
||||||
log.setSource(StrUtil.trimToNull(source));
|
log.setSource(StrUtil.trimToNull(source));
|
||||||
log.setRemark(remark);
|
log.setRemark(remark);
|
||||||
|
|||||||
@ -1189,7 +1189,7 @@ public class AlongDetailServiceImpl extends ServiceImpl<AlongDetailMapper, SdAlo
|
|||||||
if (details.isEmpty()) {
|
if (details.isEmpty()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
MsOperationLog mainLog = buildWtMainLog(recordId,"修改表层水温日数据", source);
|
MsOperationLog mainLog = buildWtMainLog(recordId,"修改表层水温日数据", source,"02");
|
||||||
msOperationLogMapper.insert(mainLog);
|
msOperationLogMapper.insert(mainLog);
|
||||||
for (MsOperationLogDetail detail : details) {
|
for (MsOperationLogDetail detail : details) {
|
||||||
detail.setMainId(mainLog.getId());
|
detail.setMainId(mainLog.getId());
|
||||||
@ -1206,7 +1206,7 @@ public class AlongDetailServiceImpl extends ServiceImpl<AlongDetailMapper, SdAlo
|
|||||||
for (Map<String, Object> row : rows) {
|
for (Map<String, Object> row : rows) {
|
||||||
String stcd = asString(row.get("STCD"));
|
String stcd = asString(row.get("STCD"));
|
||||||
String recordId = asString(row.get("ID"));
|
String recordId = asString(row.get("ID"));
|
||||||
MsOperationLog mainLog = buildWtMainLog(recordId,remark, source);
|
MsOperationLog mainLog = buildWtMainLog(recordId,remark, source,"03");
|
||||||
msOperationLogMapper.insert(mainLog);
|
msOperationLogMapper.insert(mainLog);
|
||||||
for (Map.Entry<String, Object> entry : row.entrySet()) {
|
for (Map.Entry<String, Object> entry : row.entrySet()) {
|
||||||
String fieldCode = entry.getKey();
|
String fieldCode = entry.getKey();
|
||||||
@ -1222,11 +1222,12 @@ public class AlongDetailServiceImpl extends ServiceImpl<AlongDetailMapper, SdAlo
|
|||||||
batchInsertWtLogDetails(details);
|
batchInsertWtLogDetails(details);
|
||||||
}
|
}
|
||||||
|
|
||||||
private MsOperationLog buildWtMainLog(String recordId,String remark, String source) {
|
private MsOperationLog buildWtMainLog(String recordId,String remark, String source,String operatorType) {
|
||||||
MsOperationLog log = new MsOperationLog();
|
MsOperationLog log = new MsOperationLog();
|
||||||
log.setOperator(resolveWtLogOperator());
|
log.setOperator(resolveWtLogOperator());
|
||||||
log.setOperateTime(new Date());
|
log.setOperateTime(new Date());
|
||||||
log.setRecordId(recordId);
|
log.setRecordId(recordId);
|
||||||
|
log.setOperationType(operatorType);
|
||||||
log.setTableName(WT_HOUR_TABLE_NAME);
|
log.setTableName(WT_HOUR_TABLE_NAME);
|
||||||
log.setSource(StrUtil.trimToNull(source));
|
log.setSource(StrUtil.trimToNull(source));
|
||||||
log.setRemark(remark);
|
log.setRemark(remark);
|
||||||
|
|||||||
@ -16,6 +16,7 @@ import com.yfd.platform.qgc_base.mapper.MsOperationLogMapper;
|
|||||||
import com.yfd.platform.qgc_env.wt.entity.vo.SdWtvtYearVo;
|
import com.yfd.platform.qgc_env.wt.entity.vo.SdWtvtYearVo;
|
||||||
import com.yfd.platform.qgc_env.wt.mapper.SdWtvtRMapper;
|
import com.yfd.platform.qgc_env.wt.mapper.SdWtvtRMapper;
|
||||||
import com.yfd.platform.qgc_env.wt.service.SdWtvtRService;
|
import com.yfd.platform.qgc_env.wt.service.SdWtvtRService;
|
||||||
|
import com.yfd.platform.utils.LogValueUtils;
|
||||||
import com.yfd.platform.utils.QgcQueryWrapperUtil;
|
import com.yfd.platform.utils.QgcQueryWrapperUtil;
|
||||||
import com.yfd.platform.utils.SecurityUtils;
|
import com.yfd.platform.utils.SecurityUtils;
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
@ -237,7 +238,7 @@ public class SdWtvtRServiceImpl extends ServiceImpl<SdWtvtRMapper, SdWtvtYearVo>
|
|||||||
Map<String, Object> beforeRow = beforeRowMap.get(depthKey);
|
Map<String, Object> beforeRow = beforeRowMap.get(depthKey);
|
||||||
Object oldValue = beforeRow == null ? null : beforeRow.get("VWT");
|
Object oldValue = beforeRow == null ? null : beforeRow.get("VWT");
|
||||||
Object newValue = item.get("vwt");
|
Object newValue = item.get("vwt");
|
||||||
if (StringUtils.equals(formatWtvtLogValue(oldValue), formatWtvtLogValue(newValue))) {
|
if (LogValueUtils.sameLogValue(oldValue, newValue)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
logDetails.add(buildWtvtDetail(null, stcd, "VWT",
|
logDetails.add(buildWtvtDetail(null, stcd, "VWT",
|
||||||
@ -251,7 +252,7 @@ public class SdWtvtRServiceImpl extends ServiceImpl<SdWtvtRMapper, SdWtvtYearVo>
|
|||||||
}
|
}
|
||||||
batchUpdateWtvtRData(dataList);
|
batchUpdateWtvtRData(dataList);
|
||||||
if (CollUtil.isNotEmpty(logDetails)) {
|
if (CollUtil.isNotEmpty(logDetails)) {
|
||||||
MsOperationLog mainLog = buildWtvtMainLog( stcd,"修改垂向水温数据", source);
|
MsOperationLog mainLog = buildWtvtMainLog( stcd,"修改垂向水温数据", source,"02");
|
||||||
msOperationLogMapper.insert(mainLog);
|
msOperationLogMapper.insert(mainLog);
|
||||||
for (MsOperationLogDetail detail : logDetails) {
|
for (MsOperationLogDetail detail : logDetails) {
|
||||||
detail.setMainId(mainLog.getId());
|
detail.setMainId(mainLog.getId());
|
||||||
@ -437,12 +438,12 @@ public class SdWtvtRServiceImpl extends ServiceImpl<SdWtvtRMapper, SdWtvtYearVo>
|
|||||||
List<Object> params = new ArrayList<>();
|
List<Object> params = new ArrayList<>();
|
||||||
List<String> conditions = new ArrayList<>();
|
List<String> conditions = new ArrayList<>();
|
||||||
for (DataParam item : dataParamList) {
|
for (DataParam item : dataParamList) {
|
||||||
if (item == null || StringUtils.isBlank(item.getId()) || StringUtils.isBlank(item.getDt())) {
|
if (item == null || StringUtils.isBlank(item.getId()) || StringUtils.isBlank(item.getTm())) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
conditions.add("(STCD = ? AND TM = TO_DATE(SUBSTR(?, 1, 19), 'YYYY-MM-DD HH24:MI:SS'))");
|
conditions.add("(STCD = ? AND TM = TO_DATE(SUBSTR(?, 1, 19), 'YYYY-MM-DD HH24:MI:SS'))");
|
||||||
params.add(item.getId());
|
params.add(item.getId());
|
||||||
params.add(item.getDt());
|
params.add(item.getTm());
|
||||||
}
|
}
|
||||||
if (conditions.isEmpty()) {
|
if (conditions.isEmpty()) {
|
||||||
return new ArrayList<>();
|
return new ArrayList<>();
|
||||||
@ -486,12 +487,13 @@ public class SdWtvtRServiceImpl extends ServiceImpl<SdWtvtRMapper, SdWtvtYearVo>
|
|||||||
if (CollUtil.isEmpty(rows)) {
|
if (CollUtil.isEmpty(rows)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
MsOperationLog mainLog = buildWtvtMainLog(null,remark, source);
|
|
||||||
msOperationLogMapper.insert(mainLog);
|
|
||||||
List<MsOperationLogDetail> details = new ArrayList<>();
|
List<MsOperationLogDetail> details = new ArrayList<>();
|
||||||
for (Map<String, Object> row : rows) {
|
for (Map<String, Object> row : rows) {
|
||||||
String stcd = asString(row.get("STCD"));
|
String stcd = asString(row.get("STCD"));
|
||||||
|
// String recordId = asString(row.get("ID"));
|
||||||
Object depth = row.get("WTHG");
|
Object depth = row.get("WTHG");
|
||||||
|
MsOperationLog mainLog = buildWtvtMainLog(stcd, remark, source, "03");
|
||||||
|
msOperationLogMapper.insert(mainLog);
|
||||||
for (Map.Entry<String, Object> entry : row.entrySet()) {
|
for (Map.Entry<String, Object> entry : row.entrySet()) {
|
||||||
String fieldCode = entry.getKey();
|
String fieldCode = entry.getKey();
|
||||||
Object oldValue = entry.getValue();
|
Object oldValue = entry.getValue();
|
||||||
@ -506,11 +508,12 @@ public class SdWtvtRServiceImpl extends ServiceImpl<SdWtvtRMapper, SdWtvtYearVo>
|
|||||||
batchInsertWtvtLogDetails(details);
|
batchInsertWtvtLogDetails(details);
|
||||||
}
|
}
|
||||||
|
|
||||||
private MsOperationLog buildWtvtMainLog(String recordId,String remark, String source) {
|
private MsOperationLog buildWtvtMainLog(String recordId,String remark, String source,String operationType) {
|
||||||
MsOperationLog log = new MsOperationLog();
|
MsOperationLog log = new MsOperationLog();
|
||||||
log.setOperator(resolveWtvtLogOperator());
|
log.setOperator(resolveWtvtLogOperator());
|
||||||
log.setOperateTime(new Date());
|
log.setOperateTime(new Date());
|
||||||
log.setTableName(WT_CX_TABLE_NAME);
|
log.setTableName(WT_CX_TABLE_NAME);
|
||||||
|
log.setOperationType(operationType);
|
||||||
log.setRecordId(recordId);
|
log.setRecordId(recordId);
|
||||||
log.setSource(StringUtils.trimToNull(source));
|
log.setSource(StringUtils.trimToNull(source));
|
||||||
log.setRemark(remark);
|
log.setRemark(remark);
|
||||||
|
|||||||
@ -1806,7 +1806,7 @@ public class ZqMonitorServiceImpl implements ZqMonitorService {
|
|||||||
if (details.isEmpty()) {
|
if (details.isEmpty()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
MsOperationLog mainLog = buildRiverMainLog(recordId,"修改流量站小时数据", source);
|
MsOperationLog mainLog = buildRiverMainLog(recordId,"修改流量站小时数据", source,"02");
|
||||||
msOperationLogMapper.insert(mainLog);
|
msOperationLogMapper.insert(mainLog);
|
||||||
for (MsOperationLogDetail detail : details) {
|
for (MsOperationLogDetail detail : details) {
|
||||||
detail.setMainId(mainLog.getId());
|
detail.setMainId(mainLog.getId());
|
||||||
@ -1823,7 +1823,7 @@ public class ZqMonitorServiceImpl implements ZqMonitorService {
|
|||||||
for (Map<String, Object> row : rows) {
|
for (Map<String, Object> row : rows) {
|
||||||
String stcd = asString(row.get("STCD"));
|
String stcd = asString(row.get("STCD"));
|
||||||
String recordId = asString(row.get("ID"));
|
String recordId = asString(row.get("ID"));
|
||||||
MsOperationLog mainLog = buildRiverMainLog(recordId,remark, source);
|
MsOperationLog mainLog = buildRiverMainLog(recordId,remark, source,"03");
|
||||||
msOperationLogMapper.insert(mainLog);
|
msOperationLogMapper.insert(mainLog);
|
||||||
for (Map.Entry<String, Object> entry : row.entrySet()) {
|
for (Map.Entry<String, Object> entry : row.entrySet()) {
|
||||||
String fieldCode = entry.getKey();
|
String fieldCode = entry.getKey();
|
||||||
@ -1839,9 +1839,10 @@ public class ZqMonitorServiceImpl implements ZqMonitorService {
|
|||||||
batchInsertRiverLogDetails(details);
|
batchInsertRiverLogDetails(details);
|
||||||
}
|
}
|
||||||
|
|
||||||
private MsOperationLog buildRiverMainLog(String recordId,String remark, String source) {
|
private MsOperationLog buildRiverMainLog(String recordId,String remark, String source,String operationType) {
|
||||||
MsOperationLog log = new MsOperationLog();
|
MsOperationLog log = new MsOperationLog();
|
||||||
log.setOperator(resolveRiverLogOperator());
|
log.setOperator(resolveRiverLogOperator());
|
||||||
|
log.setOperationType(operationType);
|
||||||
log.setOperateTime(new Date());
|
log.setOperateTime(new Date());
|
||||||
log.setRecordId(recordId);
|
log.setRecordId(recordId);
|
||||||
log.setTableName(ZQ_HOUR_TABLE_NAME);
|
log.setTableName(ZQ_HOUR_TABLE_NAME);
|
||||||
|
|||||||
@ -27,6 +27,7 @@ import com.yfd.platform.utils.ExportZipUtil;
|
|||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
@ -362,8 +363,26 @@ public class QgcExportServiceImpl implements IQgcExportService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (rstcdToStcd.isEmpty()) {
|
if (rstcdToStcd.isEmpty()) {
|
||||||
log.warn("指标 {} 未找到 STTP={} 的测站数据", processor.getFieldName(), sttp);
|
// 无对应测站时仍生成 Sheet,仅保留日期列(无电站列),避免整表缺失
|
||||||
return null;
|
log.warn("指标 {} 未找到 STTP={} 的测站数据,生成空 Sheet(仅日期列)", processor.getFieldName(), sttp);
|
||||||
|
List<List<Object>> emptyRows = new ArrayList<>();
|
||||||
|
int daysInMonth = getDaysInMonth(mr);
|
||||||
|
for (int d = 1; d <= daysInMonth; d++) {
|
||||||
|
List<Object> row = new ArrayList<>();
|
||||||
|
row.add(String.format("%02d", d));
|
||||||
|
emptyRows.add(row);
|
||||||
|
}
|
||||||
|
List<String> emptyLabels = processor.isVariation()
|
||||||
|
? VARIATION_LABELS
|
||||||
|
: (processor.hasComplianceRate()
|
||||||
|
? List.of("日均最低", "日均最高", "月内最低", "月内最低时间", "月内最高", "月内最高时间", "月均", LABEL_COMPLIANCE)
|
||||||
|
: BASE_LABELS);
|
||||||
|
for (String label : emptyLabels) {
|
||||||
|
List<Object> row = new ArrayList<>();
|
||||||
|
row.add(label);
|
||||||
|
emptyRows.add(row);
|
||||||
|
}
|
||||||
|
return emptyRows;
|
||||||
}
|
}
|
||||||
|
|
||||||
List<String> uniqueStcds = rstcdToStcd.values().stream().distinct().toList();
|
List<String> uniqueStcds = rstcdToStcd.values().stream().distinct().toList();
|
||||||
@ -466,8 +485,16 @@ public class QgcExportServiceImpl implements IQgcExportService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (rstcdToStcd.isEmpty()) {
|
if (rstcdToStcd.isEmpty()) {
|
||||||
log.warn("生态流量未找到 STTP=ENG 的测站数据");
|
// 未找到电站时仍生成 Sheet,仅保留子标题行(无电站数据行)
|
||||||
return null;
|
log.warn("生态流量未找到 STTP=ENG 的测站数据,生成空 Sheet");
|
||||||
|
List<String> subHeaders = Arrays.asList("电站名称", "所属水电基地", "生态流量限值", "日达标率", "小时达标率", "备注");
|
||||||
|
List<Object> subRow = new ArrayList<>();
|
||||||
|
subRow.addAll(subHeaders);
|
||||||
|
subRow.addAll(subHeaders);
|
||||||
|
subRow.addAll(subHeaders);
|
||||||
|
List<List<Object>> rows = new ArrayList<>();
|
||||||
|
rows.add(subRow);
|
||||||
|
return rows;
|
||||||
}
|
}
|
||||||
|
|
||||||
List<String> uniqueStcds = rstcdToStcd.values().stream().distinct().toList();
|
List<String> uniqueStcds = rstcdToStcd.values().stream().distinct().toList();
|
||||||
@ -773,8 +800,20 @@ public class QgcExportServiceImpl implements IQgcExportService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (rstcdToStcd.isEmpty()) {
|
if (rstcdToStcd.isEmpty()) {
|
||||||
log.warn("水质达标率未找到 STTP=WQ 的测站数据");
|
// 未找到测站时仍生成 Sheet,仅保留子标题行(无电站数据行)
|
||||||
return null;
|
log.warn("水质达标率未找到 STTP=WQ 的测站数据,生成空 Sheet");
|
||||||
|
List<Object> subRow = new ArrayList<>();
|
||||||
|
subRow.add("");
|
||||||
|
subRow.add("达标数");
|
||||||
|
subRow.add("总数");
|
||||||
|
subRow.add("达标率(%)");
|
||||||
|
subRow.add("达标数");
|
||||||
|
subRow.add("总数");
|
||||||
|
subRow.add("达标率(%)");
|
||||||
|
subRow.add("");
|
||||||
|
List<List<Object>> rows = new ArrayList<>();
|
||||||
|
rows.add(subRow);
|
||||||
|
return rows;
|
||||||
}
|
}
|
||||||
|
|
||||||
List<String> uniqueStcds = rstcdToStcd.values().stream().distinct().toList();
|
List<String> uniqueStcds = rstcdToStcd.values().stream().distinct().toList();
|
||||||
@ -1007,13 +1046,13 @@ public class QgcExportServiceImpl implements IQgcExportService {
|
|||||||
private StationResolution resolveStations(List<String> rstcds, Set<String> sttpTypes) {
|
private StationResolution resolveStations(List<String> rstcds, Set<String> sttpTypes) {
|
||||||
StationResolution result = new StationResolution();
|
StationResolution result = new StationResolution();
|
||||||
if (rstcds == null || rstcds.isEmpty()) return result;
|
if (rstcds == null || rstcds.isEmpty()) return result;
|
||||||
|
LambdaQueryWrapper<StationMapping> wrapper = new LambdaQueryWrapper<>();
|
||||||
List<StationMapping> mappings = stationMappingMapper.selectList(
|
wrapper.and(w -> {
|
||||||
new LambdaQueryWrapper<StationMapping>()
|
if (CollectionUtils.isNotEmpty(rstcds)) {
|
||||||
.in(StationMapping::getRstcd, rstcds)
|
w.in(StationMapping::getRstcd, rstcds).or().in(StationMapping::getStcd, rstcds);
|
||||||
.or()
|
}
|
||||||
.in(StationMapping::getStcd, rstcds)
|
});
|
||||||
);
|
List<StationMapping> mappings = stationMappingMapper.selectList(wrapper);
|
||||||
|
|
||||||
// 添加逻辑:如果 sttp 是 "ENG",则 rstcd 赋值为 stcd
|
// 添加逻辑:如果 sttp 是 "ENG",则 rstcd 赋值为 stcd
|
||||||
mappings.forEach(mapping -> {
|
mappings.forEach(mapping -> {
|
||||||
@ -1503,7 +1542,7 @@ public class QgcExportServiceImpl implements IQgcExportService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// QEC 水电基地维度
|
// QEC 水电基地维度
|
||||||
if (!baseIds.isEmpty()) {
|
if (hasQec && !baseIds.isEmpty()) {
|
||||||
ExportZipUtil.SheetData baseEpaSheet = buildYearQecBaseSheet(baseIds, year, "QEC");
|
ExportZipUtil.SheetData baseEpaSheet = buildYearQecBaseSheet(baseIds, year, "QEC");
|
||||||
ExportZipUtil.SheetData baseMwrSheet = buildYearQecBaseSheet(baseIds, year, "MWR");
|
ExportZipUtil.SheetData baseMwrSheet = buildYearQecBaseSheet(baseIds, year, "MWR");
|
||||||
ExportZipUtil.SheetData baseAvqSheet = buildYearQecBaseSheet(baseIds, year, "AVQ");
|
ExportZipUtil.SheetData baseAvqSheet = buildYearQecBaseSheet(baseIds, year, "AVQ");
|
||||||
@ -2013,22 +2052,20 @@ public class QgcExportServiceImpl implements IQgcExportService {
|
|||||||
stcdDisplayMap.put(stcd, StrUtil.isNotBlank(name) ? name : stcd);
|
stcdDisplayMap.put(stcd, StrUtil.isNotBlank(name) ? name : stcd);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (stcds.isEmpty()) continue;
|
|
||||||
|
|
||||||
List<List<Object>> rows;
|
List<List<Object>> rows;
|
||||||
List<String> headers;
|
List<String> headers;
|
||||||
if (processor instanceof RwtProcessor) {
|
if (stcds.isEmpty()) {
|
||||||
|
// 无测站:仍生成带表头的空 sheet,保证有标题可下载
|
||||||
|
rows = Collections.emptyList();
|
||||||
|
headers = buildRawHeaders(processor, stcdDisplayMap, Collections.emptyList());
|
||||||
|
} else if (processor instanceof RwtProcessor) {
|
||||||
rows = buildRwtRawSheetRows(stcds, stcdDisplayMap, startTime, endTime);
|
rows = buildRwtRawSheetRows(stcds, stcdDisplayMap, startTime, endTime);
|
||||||
|
if (rows == null) rows = Collections.emptyList();
|
||||||
headers = Arrays.asList("测站", "时间", "水深(m)", "水温(℃)");
|
headers = Arrays.asList("测站", "时间", "水深(m)", "水温(℃)");
|
||||||
} else {
|
} else {
|
||||||
rows = buildRawSheetRows(processor, stcds, stcdDisplayMap, startTime, endTime, isDaily);
|
rows = buildRawSheetRows(processor, stcds, stcdDisplayMap, startTime, endTime, isDaily);
|
||||||
if (rows == null) continue;
|
if (rows == null) rows = Collections.emptyList();
|
||||||
// 表头:时间 | 测站1 | 测站2 | ...
|
headers = buildRawHeaders(processor, stcdDisplayMap, stcds);
|
||||||
headers = new ArrayList<>();
|
|
||||||
headers.add("时间");
|
|
||||||
for (String stcd : stcds) {
|
|
||||||
headers.add(stcdDisplayMap.getOrDefault(stcd, stcd));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ExportZipUtil.SheetData sd = new ExportZipUtil.SheetData(processor.getSheetName(), headers, rows);
|
ExportZipUtil.SheetData sd = new ExportZipUtil.SheetData(processor.getSheetName(), headers, rows);
|
||||||
@ -2036,8 +2073,10 @@ public class QgcExportServiceImpl implements IQgcExportService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (sheets.isEmpty()) {
|
if (sheets.isEmpty()) {
|
||||||
log.warn("hour/day 模式:没有可用数据");
|
// 无可用数据时也返回 Excel 空表,保证前端能下载到文件
|
||||||
return;
|
log.warn("hour/day 模式:没有可用数据,返回空表");
|
||||||
|
sheets.add(new ExportZipUtil.SheetData("数据",
|
||||||
|
Collections.singletonList("无可用数据"), Collections.emptyList()));
|
||||||
}
|
}
|
||||||
|
|
||||||
// 5. ZIP 导出
|
// 5. ZIP 导出
|
||||||
@ -2094,6 +2133,19 @@ public class QgcExportServiceImpl implements IQgcExportService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 构建原始数据表头:时间 | 测站1 | 测站2 | ...(无测站时仅剩"时间"列)
|
||||||
|
*/
|
||||||
|
private List<String> buildRawHeaders(ExportIndicatorProcessor processor,
|
||||||
|
Map<String, String> stcdDisplayMap, List<String> stcds) {
|
||||||
|
List<String> headers = new ArrayList<>();
|
||||||
|
headers.add("时间");
|
||||||
|
for (String stcd : stcds) {
|
||||||
|
headers.add(stcdDisplayMap.getOrDefault(stcd, stcd));
|
||||||
|
}
|
||||||
|
return headers;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 构建 RWT 垂向水温原始数据行
|
* 构建 RWT 垂向水温原始数据行
|
||||||
* 格式:测站 | 时间 | 水深(m) | 水温(℃)
|
* 格式:测站 | 时间 | 水深(m) | 水温(℃)
|
||||||
|
|||||||
@ -24,6 +24,7 @@ import com.yfd.platform.system.service.ISysLogService;
|
|||||||
import com.yfd.platform.system.service.IUserService;
|
import com.yfd.platform.system.service.IUserService;
|
||||||
import com.yfd.platform.utils.RequestHolder;
|
import com.yfd.platform.utils.RequestHolder;
|
||||||
import com.yfd.platform.utils.RsaUtils;
|
import com.yfd.platform.utils.RsaUtils;
|
||||||
|
import com.yfd.platform.utils.SecurityUtils;
|
||||||
import com.yfd.platform.utils.StringUtils;
|
import com.yfd.platform.utils.StringUtils;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
@ -479,7 +480,8 @@ public class LoginController {
|
|||||||
* 判断是否为超级管理员
|
* 判断是否为超级管理员
|
||||||
*/
|
*/
|
||||||
private boolean checkIsSuperAdmin(String userId) {
|
private boolean checkIsSuperAdmin(String userId) {
|
||||||
String maxLevel = sysUserMapper.getMaxLevel(userId);
|
String tenantId = SecurityUtils.getTenantId();
|
||||||
|
String maxLevel = sysUserMapper.getMaxLevel(userId,tenantId);
|
||||||
return "1".equals(maxLevel);
|
return "1".equals(maxLevel);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -18,6 +18,7 @@ import com.yfd.platform.system.service.ISysLogService;
|
|||||||
import com.yfd.platform.system.service.IUserService;
|
import com.yfd.platform.system.service.IUserService;
|
||||||
import com.yfd.platform.utils.RequestHolder;
|
import com.yfd.platform.utils.RequestHolder;
|
||||||
import com.yfd.platform.utils.RsaUtils;
|
import com.yfd.platform.utils.RsaUtils;
|
||||||
|
import com.yfd.platform.utils.SecurityUtils;
|
||||||
import com.yfd.platform.utils.StringUtils;
|
import com.yfd.platform.utils.StringUtils;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
@ -579,7 +580,8 @@ public class SmsVerifyCodeController {
|
|||||||
* 判断用户是否为超级管理员(拥有LEVEL=1的角色)
|
* 判断用户是否为超级管理员(拥有LEVEL=1的角色)
|
||||||
*/
|
*/
|
||||||
private boolean isSuperAdmin(String userId) {
|
private boolean isSuperAdmin(String userId) {
|
||||||
String maxLevel = sysUserMapper.getMaxLevel(userId);
|
String tenantId = SecurityUtils.getTenantId();
|
||||||
|
String maxLevel = sysUserMapper.getMaxLevel(userId,tenantId);
|
||||||
return "1".equals(maxLevel);
|
return "1".equals(maxLevel);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -62,7 +62,7 @@ public interface SysUserMapper extends BaseMapper<SysUser> {
|
|||||||
* userid 用户id
|
* userid 用户id
|
||||||
* 返回值说明:
|
* 返回值说明:
|
||||||
************************************/
|
************************************/
|
||||||
String getMaxLevel(@Param("userId") String userId);
|
String getMaxLevel(@Param("userId") String userId,@Param("tenantId") String tenantId);
|
||||||
|
|
||||||
/***********************************
|
/***********************************
|
||||||
* 用途说明:根据用户id删除所分配的角色
|
* 用途说明:根据用户id删除所分配的角色
|
||||||
|
|||||||
@ -75,7 +75,8 @@ public class AdminAuthServiceImpl implements IAdminAuthService {
|
|||||||
@Override
|
@Override
|
||||||
public boolean isCurrentManagedAdmin() {
|
public boolean isCurrentManagedAdmin() {
|
||||||
// SysUser sysUser = userMapper.selectById(SecurityUtils.getUserId());
|
// SysUser sysUser = userMapper.selectById(SecurityUtils.getUserId());
|
||||||
String maxLevel = userMapper.getMaxLevel(SecurityUtils.getUserId());
|
String tenantId = SecurityUtils.getTenantId();
|
||||||
|
String maxLevel = userMapper.getMaxLevel(SecurityUtils.getUserId(),tenantId);
|
||||||
boolean adminRole = "1".equals(maxLevel);
|
boolean adminRole = "1".equals(maxLevel);
|
||||||
String currentUsername = SecurityUtils.getCurrentUsername();
|
String currentUsername = SecurityUtils.getCurrentUsername();
|
||||||
return adminRole||isManagedAdminUsername(currentUsername);
|
return adminRole||isManagedAdminUsername(currentUsername);
|
||||||
|
|||||||
@ -11,6 +11,7 @@ import com.yfd.platform.system.mapper.SysUserMapper;
|
|||||||
import com.yfd.platform.system.mapper.SysUserTenantMapper;
|
import com.yfd.platform.system.mapper.SysUserTenantMapper;
|
||||||
import com.yfd.platform.system.service.IAdminAuthService;
|
import com.yfd.platform.system.service.IAdminAuthService;
|
||||||
import com.yfd.platform.system.service.IUserService;
|
import com.yfd.platform.system.service.IUserService;
|
||||||
|
import com.yfd.platform.utils.SecurityUtils;
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
import org.springframework.security.core.userdetails.UserDetails;
|
import org.springframework.security.core.userdetails.UserDetails;
|
||||||
import org.springframework.security.core.userdetails.UserDetailsService;
|
import org.springframework.security.core.userdetails.UserDetailsService;
|
||||||
@ -105,7 +106,8 @@ public class UserDetailsServiceImpl implements UserDetailsService {
|
|||||||
* 判断用户是否为超级管理员(拥有LEVEL=1的角色)
|
* 判断用户是否为超级管理员(拥有LEVEL=1的角色)
|
||||||
*/
|
*/
|
||||||
private boolean isSuperAdmin(String userId) {
|
private boolean isSuperAdmin(String userId) {
|
||||||
String maxLevel = sysUserMapper.getMaxLevel(userId);
|
String tenantId = SecurityUtils.getTenantId();
|
||||||
|
String maxLevel = sysUserMapper.getMaxLevel(userId,tenantId);
|
||||||
return "1".equals(maxLevel);
|
return "1".equals(maxLevel);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -543,7 +543,8 @@ public class UserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impleme
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
String currentUserId = SecurityUtils.getUserId();
|
String currentUserId = SecurityUtils.getUserId();
|
||||||
String level = sysUserMapper.getMaxLevel(currentUserId);
|
String tenantId = SecurityUtils.getTenantId();
|
||||||
|
String level = sysUserMapper.getMaxLevel(currentUserId, tenantId);
|
||||||
Integer roleLevel = parseRoleLevel(level);
|
Integer roleLevel = parseRoleLevel(level);
|
||||||
return roleLevel != null && roleLevel <= 2;
|
return roleLevel != null && roleLevel <= 2;
|
||||||
}
|
}
|
||||||
@ -1030,7 +1031,8 @@ public class UserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impleme
|
|||||||
|
|
||||||
|
|
||||||
public boolean isSuperAdmin(String userId) {
|
public boolean isSuperAdmin(String userId) {
|
||||||
String maxLevel = sysUserMapper.getMaxLevel(userId);
|
String tenantId = SecurityUtils.getTenantId();
|
||||||
|
String maxLevel = sysUserMapper.getMaxLevel(userId,tenantId);
|
||||||
SysUser sysUser = sysUserMapper.selectById(userId);
|
SysUser sysUser = sysUserMapper.selectById(userId);
|
||||||
return (sysUser!=null && sysUser.getUsertype()==0) || "1".equals(maxLevel);
|
return (sysUser!=null && sysUser.getUsertype()==0) || "1".equals(maxLevel);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -486,10 +486,10 @@ public class ExportZipUtil {
|
|||||||
// ---- 自动调整列宽 ----
|
// ---- 自动调整列宽 ----
|
||||||
autoSizeColumns(sheet, colCount);
|
autoSizeColumns(sheet, colCount);
|
||||||
|
|
||||||
// 冻结表头行
|
// 冻结表头行(含多层表头:headerRowCount 表示除首行外的子表头,总冻结行数 = 1 + headerRowCount)
|
||||||
if (currentRow > 1) {
|
if (currentRow > 1) {
|
||||||
int freezeRows = 1 + sheetData.getHeaderRowCount();
|
int freezeRows = Math.min(1 + sheetData.getHeaderRowCount(), currentRow);
|
||||||
sheet.createFreezePane(0, Math.min(freezeRows, currentRow - 1));
|
sheet.createFreezePane(0, freezeRows);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
64
backend/src/main/java/com/yfd/platform/utils/JasyptUtil.java
Normal file
64
backend/src/main/java/com/yfd/platform/utils/JasyptUtil.java
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
package com.yfd.platform.utils;
|
||||||
|
|
||||||
|
import org.jasypt.encryption.pbe.StandardPBEStringEncryptor;
|
||||||
|
import org.jasypt.encryption.pbe.config.EnvironmentStringPBEConfig;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Jasypt 加密解密工具
|
||||||
|
* 配置:算法 PBEWithMD5AndTripleDES,密钥 dec,迭代次数 1000(默认)
|
||||||
|
*/
|
||||||
|
public class JasyptUtil {
|
||||||
|
|
||||||
|
private static final String PASSWORD = "dec";
|
||||||
|
// 建议使用标准名称(Java 内部识别),原写法也兼容但推荐此写法
|
||||||
|
private static final String ALGORITHM = "PBEWithMD5AndTripleDES";
|
||||||
|
private static final int ITERATIONS = 1000;
|
||||||
|
|
||||||
|
private static StandardPBEStringEncryptor getEncryptor() {
|
||||||
|
StandardPBEStringEncryptor encryptor = new StandardPBEStringEncryptor();
|
||||||
|
EnvironmentStringPBEConfig config = new EnvironmentStringPBEConfig();
|
||||||
|
config.setPassword(PASSWORD);
|
||||||
|
config.setAlgorithm(ALGORITHM);
|
||||||
|
config.setKeyObtentionIterations(ITERATIONS);
|
||||||
|
encryptor.setConfig(config);
|
||||||
|
return encryptor;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 加密明文
|
||||||
|
* @param plainText 明文
|
||||||
|
* @return 密文(Base64 字符串)
|
||||||
|
*/
|
||||||
|
public static String encrypt(String plainText) {
|
||||||
|
StandardPBEStringEncryptor encryptor = getEncryptor();
|
||||||
|
return encryptor.encrypt(plainText);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 解密密文
|
||||||
|
* @param cipherText 密文(Base64 字符串)
|
||||||
|
* @return 明文
|
||||||
|
* @throws org.jasypt.exceptions.EncryptionOperationNotPossibleException 如果解密失败(密钥/算法不匹配)
|
||||||
|
*/
|
||||||
|
public static String decrypt(String cipherText) {
|
||||||
|
StandardPBEStringEncryptor encryptor = getEncryptor();
|
||||||
|
return encryptor.decrypt(cipherText);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 测试入口
|
||||||
|
public static void main(String[] args) {
|
||||||
|
// 1. 加密测试
|
||||||
|
String plain = "Lcj@5678.";
|
||||||
|
String encrypted = encrypt(plain);
|
||||||
|
System.out.println("加密后的密文:" + encrypted);
|
||||||
|
|
||||||
|
// 2. 解密测试(用你自己的密文)
|
||||||
|
String yourCipher = "w8ffsaU1GBbVeJ5wnBeCwoUDcadbD2oL";
|
||||||
|
try {
|
||||||
|
String decrypted = decrypt(yourCipher);
|
||||||
|
System.out.println("解密结果:" + decrypted);
|
||||||
|
} catch (Exception e) {
|
||||||
|
System.err.println("解密失败,请检查密钥或算法是否正确:" + e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,67 @@
|
|||||||
|
package com.yfd.platform.utils;
|
||||||
|
|
||||||
|
import cn.hutool.core.date.DateUtil;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 日志值比较与格式化工具类,供各业务模块(生态流量、垂向水温等)操作日志记录时共用。
|
||||||
|
*
|
||||||
|
* @author supeng
|
||||||
|
*/
|
||||||
|
public class LogValueUtils {
|
||||||
|
|
||||||
|
private LogValueUtils() {
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 比较新旧两个值是否相同,用于判断字段值是否发生变化。
|
||||||
|
* <p>
|
||||||
|
* 规则:
|
||||||
|
* <ul>
|
||||||
|
* <li>两者都为 null 视为相同</li>
|
||||||
|
* <li>一者为 null 视为不同</li>
|
||||||
|
* <li>BigDecimal/Double 等数值类型按数值大小比较,忽略精度差异(133.0000 == 133.00)</li>
|
||||||
|
* <li>其余类型按 {@link #formatLogValue(Object)} 格式化后字符串比较</li>
|
||||||
|
* </ul>
|
||||||
|
*
|
||||||
|
* @param oldValue 旧值
|
||||||
|
* @param newValue 新值
|
||||||
|
* @return true 表示相同
|
||||||
|
*/
|
||||||
|
public static boolean sameLogValue(Object oldValue, Object newValue) {
|
||||||
|
if (oldValue == null && newValue == null) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (oldValue == null || newValue == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
// BigDecimal/Double 等数值类型按数值大小比较,忽略精度差异(133.0000 == 133.00)
|
||||||
|
if (oldValue instanceof Number && newValue instanceof Number) {
|
||||||
|
try {
|
||||||
|
return new BigDecimal(oldValue.toString()).compareTo(new BigDecimal(newValue.toString())) == 0;
|
||||||
|
} catch (NumberFormatException e) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return StrUtil.equals(formatLogValue(oldValue), formatLogValue(newValue));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 格式化日志中的值:Date 格式化为日期时间字符串,其余直接转字符串。
|
||||||
|
*
|
||||||
|
* @param value 原始值
|
||||||
|
* @return 格式化后的字符串
|
||||||
|
*/
|
||||||
|
public static String formatLogValue(Object value) {
|
||||||
|
if (value == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
if (value instanceof Date date) {
|
||||||
|
return DateUtil.formatDateTime(date);
|
||||||
|
}
|
||||||
|
return String.valueOf(value);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -15,11 +15,13 @@
|
|||||||
*/
|
*/
|
||||||
package com.yfd.platform.utils;
|
package com.yfd.platform.utils;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
import cn.hutool.json.JSONArray;
|
import cn.hutool.json.JSONArray;
|
||||||
import cn.hutool.json.JSONObject;
|
import cn.hutool.json.JSONObject;
|
||||||
import cn.hutool.json.JSONUtil;
|
import cn.hutool.json.JSONUtil;
|
||||||
import com.yfd.platform.exception.BadRequestException;
|
import com.yfd.platform.exception.BadRequestException;
|
||||||
import com.yfd.platform.system.domain.LoginUser;
|
import com.yfd.platform.system.domain.LoginUser;
|
||||||
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.http.HttpStatus;
|
import org.springframework.http.HttpStatus;
|
||||||
import org.springframework.security.core.Authentication;
|
import org.springframework.security.core.Authentication;
|
||||||
@ -27,6 +29,8 @@ import org.springframework.security.core.GrantedAuthority;
|
|||||||
import org.springframework.security.core.context.SecurityContextHolder;
|
import org.springframework.security.core.context.SecurityContextHolder;
|
||||||
import org.springframework.security.core.userdetails.UserDetails;
|
import org.springframework.security.core.userdetails.UserDetails;
|
||||||
import org.springframework.security.core.userdetails.UserDetailsService;
|
import org.springframework.security.core.userdetails.UserDetailsService;
|
||||||
|
import org.springframework.web.context.request.RequestContextHolder;
|
||||||
|
import org.springframework.web.context.request.ServletRequestAttributes;
|
||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -38,7 +42,7 @@ import java.util.List;
|
|||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class SecurityUtils {
|
public class SecurityUtils {
|
||||||
|
private static final String TENANT_HEADER = "Tenant_Id";
|
||||||
/**
|
/**
|
||||||
* 获取当前登录的用户
|
* 获取当前登录的用户
|
||||||
* @return UserDetails
|
* @return UserDetails
|
||||||
@ -142,4 +146,18 @@ public class SecurityUtils {
|
|||||||
LoginUser loginUser = (LoginUser) authentication.getPrincipal();
|
LoginUser loginUser = (LoginUser) authentication.getPrincipal();
|
||||||
return loginUser.getAccessibleTenantIds();
|
return loginUser.getAccessibleTenantIds();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 从当前请求头中获取租户ID
|
||||||
|
* @return 租户ID,未获取到返回 null
|
||||||
|
*/
|
||||||
|
public static String getTenantId() {
|
||||||
|
ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
|
||||||
|
if (attributes == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
HttpServletRequest request = attributes.getRequest();
|
||||||
|
String tenantId = request.getHeader(TENANT_HEADER);
|
||||||
|
return StrUtil.isNotBlank(tenantId) ? tenantId : null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -53,7 +53,7 @@
|
|||||||
FROM (
|
FROM (
|
||||||
SELECT r."LEVEL" AS level_col
|
SELECT r."LEVEL" AS level_col
|
||||||
FROM sys_role r
|
FROM sys_role r
|
||||||
WHERE r.id IN (SELECT roleid FROM sys_role_users WHERE userid = #{userId})
|
WHERE TENANT_ID = #{tenantId} AND r.id IN (SELECT roleid FROM sys_role_users WHERE userid = #{userId})
|
||||||
) t
|
) t
|
||||||
</select>
|
</select>
|
||||||
<select id="queryUsers" resultType="com.yfd.platform.system.domain.SysUser">
|
<select id="queryUsers" resultType="com.yfd.platform.system.domain.SysUser">
|
||||||
|
|||||||
@ -11,7 +11,7 @@ VITE_APP_BASE_URL = 'http://localhost:8093'
|
|||||||
# 测试环境
|
# 测试环境
|
||||||
# VITE_APP_BASE_URL = 'http://172.16.21.142:8093'
|
# VITE_APP_BASE_URL = 'http://172.16.21.142:8093'
|
||||||
# 汤伟
|
# 汤伟
|
||||||
VITE_APP_BASE_URL = 'http://10.84.111.235:8093'
|
VITE_APP_BASE_URL = 'http://10.84.216.252:8093'
|
||||||
# 李林
|
# 李林
|
||||||
# VITE_APP_BASE_URL = 'http://10.84.111.25:8093'
|
# VITE_APP_BASE_URL = 'http://10.84.111.25:8093'
|
||||||
|
|
||||||
|
|||||||
@ -286,6 +286,14 @@ export function getFishReleaseMonitorSectionList(data) {
|
|||||||
data
|
data
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
//过鱼设施名称新接口
|
||||||
|
export function overviewvmsstbprptGetKendoList(data) {
|
||||||
|
return request({
|
||||||
|
url: '/overview/vmsstbprpt/GetKendoList',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
||||||
// 过鱼监测数据
|
// 过鱼监测数据
|
||||||
export function getFishReleaseMonitorList(data) {
|
export function getFishReleaseMonitorList(data) {
|
||||||
return request({
|
return request({
|
||||||
|
|||||||
@ -81,3 +81,8 @@ watch(
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
</script>
|
</script>
|
||||||
|
<style scoped lang="scss">
|
||||||
|
:deep(.ant-descriptions-item-label){
|
||||||
|
min-width: 140px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@ -147,6 +147,11 @@ const columns = computed<any[]>(() => [
|
|||||||
visible: true,
|
visible: true,
|
||||||
width: 120,
|
width: 120,
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
|
customRender: ({ text, record }: any) => {
|
||||||
|
// 有值就显示,无值就用 recordId 兜底
|
||||||
|
if (text && text !== '-' && text !== 'null' && text !== 'undefined') return text;
|
||||||
|
return record.recordId || '-';
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: "operator",
|
key: "operator",
|
||||||
|
|||||||
@ -322,7 +322,7 @@ const initTable = (values: any) => {
|
|||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
tableScrollY.value = calcTableScrollY();
|
tableScrollY.value = calcTableScrollY(tableRef.value);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -178,6 +178,7 @@
|
|||||||
value-format="YYYY-MM-DD HH:mm:ss"
|
value-format="YYYY-MM-DD HH:mm:ss"
|
||||||
placeholder="请选择第一台机组投产时间"
|
placeholder="请选择第一台机组投产时间"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
|
:disabled-date="disabledPiodtDate"
|
||||||
/>
|
/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
@ -189,6 +190,7 @@
|
|||||||
value-format="YYYY-MM-DD HH:mm:ss"
|
value-format="YYYY-MM-DD HH:mm:ss"
|
||||||
placeholder="请选择全部机组投产时间"
|
placeholder="请选择全部机组投产时间"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
|
:disabled-date="disabledAiodtDate"
|
||||||
/>
|
/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
@ -900,6 +902,7 @@
|
|||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, computed, watch } from 'vue';
|
import { ref, computed, watch } from 'vue';
|
||||||
|
import dayjs from 'dayjs';
|
||||||
import { message } from 'ant-design-vue';
|
import { message } from 'ant-design-vue';
|
||||||
import { addPowerInfo, updatePowerInfo } from '@/api/DataQueryMenuModule';
|
import { addPowerInfo, updatePowerInfo } from '@/api/DataQueryMenuModule';
|
||||||
import { BasicColumns } from '@/components/MapModal/column.config';
|
import { BasicColumns } from '@/components/MapModal/column.config';
|
||||||
@ -949,6 +952,18 @@ const formRules = computed(() => ({
|
|||||||
reachcd: [{ required: true, message: '请选择所在河段', trigger: 'change' }]
|
reachcd: [{ required: true, message: '请选择所在河段', trigger: 'change' }]
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
// 第一台机组投产时间须早于全部机组投产时间:双向通过 disabled-date 禁用不合理日期
|
||||||
|
const disabledPiodtDate = (current: any) => {
|
||||||
|
const aiodt = formData.value?.aiodt;
|
||||||
|
if (!aiodt) return false;
|
||||||
|
return current && current.endOf('day') > dayjs(aiodt);
|
||||||
|
};
|
||||||
|
const disabledAiodtDate = (current: any) => {
|
||||||
|
const piodt = formData.value?.piodt;
|
||||||
|
if (!piodt) return false;
|
||||||
|
return current && current.endOf('day') < dayjs(piodt);
|
||||||
|
};
|
||||||
|
|
||||||
// 确认弹框状态
|
// 确认弹框状态
|
||||||
const confirmModalVisible = ref(false);
|
const confirmModalVisible = ref(false);
|
||||||
|
|
||||||
|
|||||||
@ -176,7 +176,7 @@ const columnMetaMap: Record<string, any> = {
|
|||||||
addvcdName: { width: 150, sort: true, ellipsis: true },
|
addvcdName: { width: 150, sort: true, ellipsis: true },
|
||||||
stlc: { width: 200, sort: true, ellipsis: true },
|
stlc: { width: 200, sort: true, ellipsis: true },
|
||||||
baseName: { width: 120, ellipsis: true },
|
baseName: { width: 120, ellipsis: true },
|
||||||
jcdt: { width: 180, sort: true, ellipsis: true, customRender: dateRender },
|
jcdt: { width: 120, sort: true, ellipsis: true, customRender: dateRender },
|
||||||
piodt: { width: 160, sort: true, ellipsis: true, customRender: dateRender },
|
piodt: { width: 160, sort: true, ellipsis: true, customRender: dateRender },
|
||||||
aiodt: { width: 150, sort: true, ellipsis: true, customRender: dateRender },
|
aiodt: { width: 150, sort: true, ellipsis: true, customRender: dateRender },
|
||||||
bldsttCcodeName: { width: 100, sort: true, ellipsis: true },
|
bldsttCcodeName: { width: 100, sort: true, ellipsis: true },
|
||||||
@ -565,7 +565,7 @@ onMounted(() => {
|
|||||||
init();
|
init();
|
||||||
fetchColumnConfig();
|
fetchColumnConfig();
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
tableScrollY.value = calcTableScrollY();
|
tableScrollY.value = calcTableScrollY(tableRef.value);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -95,8 +95,9 @@
|
|||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
color: rgba(0, 0, 0, 0.85);
|
color: rgba(0, 0, 0, 0.85);
|
||||||
max-height: 440px;
|
max-height: 350px;
|
||||||
overflow-y: scroll;
|
overflow-y: scroll;
|
||||||
|
padding: 10px 10px;
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
{{ fishResource.shapedesc }}
|
{{ fishResource.shapedesc }}
|
||||||
|
|||||||
@ -60,7 +60,7 @@
|
|||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="12">
|
<a-col :span="12">
|
||||||
<a-form-item label="纬度(°)" name="lttd">
|
<a-form-item label="纬度(°)" name="lttd">
|
||||||
<a-input-number v-model:value="formData.lttd" placeholder="请输入" :precision="6" style="width: 100%" />
|
<a-input-number v-model:value="formData.lttd" placeholder="请输入" :precision="6" :min="-90" :max="90" style="width: 100%" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="12">
|
<a-col :span="12">
|
||||||
@ -217,17 +217,6 @@
|
|||||||
/>
|
/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="24">
|
|
||||||
<a-form-item label="简介" name="introduce" :label-col="{ span: 4 }" :wrapper-col="{ span: 20 }">
|
|
||||||
<a-textarea
|
|
||||||
v-model:value="formData.introduce"
|
|
||||||
placeholder="请输入简介"
|
|
||||||
:maxlength="1000"
|
|
||||||
show-count
|
|
||||||
:rows="2"
|
|
||||||
/>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="24">
|
<a-col :span="24">
|
||||||
<a-form-item label="备注" name="remark" :label-col="{ span: 4 }" :wrapper-col="{ span: 20 }">
|
<a-form-item label="备注" name="remark" :label-col="{ span: 4 }" :wrapper-col="{ span: 20 }">
|
||||||
<a-textarea
|
<a-textarea
|
||||||
@ -322,7 +311,6 @@ const fieldLabelMap: Record<string, string> = {
|
|||||||
siminfo: 'SIM卡信息',
|
siminfo: 'SIM卡信息',
|
||||||
lxr: '联系人',
|
lxr: '联系人',
|
||||||
purpose: '用途',
|
purpose: '用途',
|
||||||
introduce: '简介',
|
|
||||||
remark: '备注'
|
remark: '备注'
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -281,7 +281,7 @@ const handleDelete = (record: any) => {
|
|||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
tableScrollY.value = calcTableScrollY();
|
tableScrollY.value = calcTableScrollY(tableRef.value);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -64,12 +64,12 @@
|
|||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="12">
|
<a-col :span="12">
|
||||||
<a-form-item label="经度(°)" name="lgtd">
|
<a-form-item label="经度(°)" name="lgtd">
|
||||||
<a-input-number v-model:value="formData.lgtd" placeholder="请输入" :precision="6" style="width: 100%" />
|
<a-input-number v-model:value="formData.lgtd" placeholder="请输入" :precision="6" :min="-180" :max="180" style="width: 100%" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="12">
|
<a-col :span="12">
|
||||||
<a-form-item label="纬度(°)" name="lttd">
|
<a-form-item label="纬度(°)" name="lttd">
|
||||||
<a-input-number v-model:value="formData.lttd" placeholder="请输入" :precision="6" style="width: 100%" />
|
<a-input-number v-model:value="formData.lttd" placeholder="请输入" :precision="6" :min="-90" :max="90" style="width: 100%" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="12">
|
<a-col :span="12">
|
||||||
|
|||||||
@ -158,7 +158,8 @@ const columns = ref<any[]>([
|
|||||||
title: '备注',
|
title: '备注',
|
||||||
dataIndex: 'remark',
|
dataIndex: 'remark',
|
||||||
visible: true,
|
visible: true,
|
||||||
ellipsis: true
|
ellipsis: true,
|
||||||
|
width: 320
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 'action',
|
key: 'action',
|
||||||
@ -269,7 +270,7 @@ const handleDelete = (record: any) => {
|
|||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
tableScrollY.value = calcTableScrollY();
|
tableScrollY.value = calcTableScrollY(tableRef.value);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -64,12 +64,12 @@
|
|||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="12">
|
<a-col :span="12">
|
||||||
<a-form-item label="经度(°)" name="lgtd">
|
<a-form-item label="经度(°)" name="lgtd">
|
||||||
<a-input-number v-model:value="formData.lgtd" placeholder="请输入" :precision="6" style="width: 100%" />
|
<a-input-number v-model:value="formData.lgtd" placeholder="请输入" :precision="6" :min="-180" :max="180" style="width: 100%" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="12">
|
<a-col :span="12">
|
||||||
<a-form-item label="纬度(°)" name="lttd">
|
<a-form-item label="纬度(°)" name="lttd">
|
||||||
<a-input-number v-model:value="formData.lttd" placeholder="请输入" :precision="6" style="width: 100%" />
|
<a-input-number v-model:value="formData.lttd" placeholder="请输入" :precision="6" :min="-90" :max="90" style="width: 100%" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="12">
|
<a-col :span="12">
|
||||||
@ -226,17 +226,7 @@
|
|||||||
/>
|
/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="24">
|
|
||||||
<a-form-item label="简介" name="introduce" :label-col="{ span: 4 }" :wrapper-col="{ span: 20 }">
|
|
||||||
<a-textarea
|
|
||||||
v-model:value="formData.introduce"
|
|
||||||
placeholder="请输入简介"
|
|
||||||
:maxlength="1000"
|
|
||||||
show-count
|
|
||||||
:rows="2"
|
|
||||||
/>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="24">
|
<a-col :span="24">
|
||||||
<a-form-item label="备注" name="remark" :label-col="{ span: 4 }" :wrapper-col="{ span: 20 }">
|
<a-form-item label="备注" name="remark" :label-col="{ span: 4 }" :wrapper-col="{ span: 20 }">
|
||||||
<a-textarea
|
<a-textarea
|
||||||
|
|||||||
@ -289,7 +289,7 @@ const handleDelete = (record: any) => {
|
|||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
tableScrollY.value = calcTableScrollY();
|
tableScrollY.value = calcTableScrollY(tableRef.value);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -108,6 +108,8 @@
|
|||||||
v-model:value="formData.lgtd"
|
v-model:value="formData.lgtd"
|
||||||
placeholder="请输入"
|
placeholder="请输入"
|
||||||
:precision="6"
|
:precision="6"
|
||||||
|
:min="-180"
|
||||||
|
:max="180"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
/>
|
/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
@ -118,6 +120,8 @@
|
|||||||
v-model:value="formData.lttd"
|
v-model:value="formData.lttd"
|
||||||
placeholder="请输入"
|
placeholder="请输入"
|
||||||
:precision="6"
|
:precision="6"
|
||||||
|
:min="-90"
|
||||||
|
:max="90"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
/>
|
/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
@ -596,7 +600,7 @@ const loadDropdownData = () => {
|
|||||||
field: 'sttpCode',
|
field: 'sttpCode',
|
||||||
operator: 'in',
|
operator: 'in',
|
||||||
dataType: 'string',
|
dataType: 'string',
|
||||||
value: ['FP', 'FP_1', 'FP_2', 'FP_3', 'FP_4', 'FP_5']
|
value: ['FP_1', 'FP_2', 'FP_3', 'FP_4', 'FP_5']
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@ -28,7 +28,7 @@ const searchList: any = computed(() => [
|
|||||||
|
|
||||||
const getBaseList = async () => {
|
const getBaseList = async () => {
|
||||||
const res = await sttpGetKendoList({
|
const res = await sttpGetKendoList({
|
||||||
filter: { logic: 'and', filters: [{ field: 'sttpCode', operator: 'in', dataType: 'string', value: ['FP', 'FP_1', 'FP_2', 'FP_3', 'FP_4', 'FP_5'] }] }
|
filter: { logic: 'and', filters: [{ field: 'sttpCode', operator: 'in', dataType: 'string', value: ['FP_1', 'FP_2', 'FP_3', 'FP_4', 'FP_5'] }] }
|
||||||
});
|
});
|
||||||
sttpOption.value = res.data.data.map(item => ({ label: item.sttpName, value: item.sttpCode }));
|
sttpOption.value = res.data.data.map(item => ({ label: item.sttpName, value: item.sttpCode }));
|
||||||
};
|
};
|
||||||
|
|||||||
@ -83,7 +83,7 @@ const handleEditSuccess = () => { initTable(currentSearchParams.value); };
|
|||||||
const deleteFpFn = async (record: any, reason: string) => deleteFpInfo({ ids: [record.stcd], source: reason });
|
const deleteFpFn = async (record: any, reason: string) => deleteFpInfo({ ids: [record.stcd], source: reason });
|
||||||
const handleDelete = (record: any) => { deleteModalRef.value?.open(record, () => initTable(currentSearchParams.value)); };
|
const handleDelete = (record: any) => { deleteModalRef.value?.open(record, () => initTable(currentSearchParams.value)); };
|
||||||
|
|
||||||
onMounted(() => { nextTick(() => { tableScrollY.value = calcTableScrollY(); }); });
|
onMounted(() => { nextTick(() => { tableScrollY.value = calcTableScrollY(tableRef.value); }); });
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
|||||||
@ -64,12 +64,12 @@
|
|||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="12">
|
<a-col :span="12">
|
||||||
<a-form-item label="经度(°)" name="lgtd">
|
<a-form-item label="经度(°)" name="lgtd">
|
||||||
<a-input-number v-model:value="formData.lgtd" placeholder="请输入" :precision="6" style="width: 100%" />
|
<a-input-number v-model:value="formData.lgtd" placeholder="请输入" :precision="6" :min="-180" :max="180" style="width: 100%" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="12">
|
<a-col :span="12">
|
||||||
<a-form-item label="纬度(°)" name="lttd">
|
<a-form-item label="纬度(°)" name="lttd">
|
||||||
<a-input-number v-model:value="formData.lttd" placeholder="请输入" :precision="6" style="width: 100%" />
|
<a-input-number v-model:value="formData.lttd" placeholder="请输入" :precision="6" :min="-90" :max="90" style="width: 100%" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="12">
|
<a-col :span="12">
|
||||||
|
|||||||
@ -144,7 +144,8 @@ const columns = ref<any[]>([
|
|||||||
title: '备注',
|
title: '备注',
|
||||||
dataIndex: 'remark',
|
dataIndex: 'remark',
|
||||||
visible: true,
|
visible: true,
|
||||||
ellipsis: true
|
ellipsis: true,
|
||||||
|
width:280
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 'action',
|
key: 'action',
|
||||||
@ -259,7 +260,7 @@ const handleDelete = (record: any) => {
|
|||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
tableScrollY.value = calcTableScrollY();
|
tableScrollY.value = calcTableScrollY(tableRef.value);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -265,7 +265,7 @@ const handleDelete = (record: any) => {
|
|||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
tableScrollY.value = calcTableScrollY();
|
tableScrollY.value = calcTableScrollY(tableRef.value);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -59,6 +59,8 @@
|
|||||||
v-model:value="formData.lgtd"
|
v-model:value="formData.lgtd"
|
||||||
placeholder="请输入"
|
placeholder="请输入"
|
||||||
:precision="6"
|
:precision="6"
|
||||||
|
:min="-180"
|
||||||
|
:max="180"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
/>
|
/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
@ -69,6 +71,8 @@
|
|||||||
v-model:value="formData.lttd"
|
v-model:value="formData.lttd"
|
||||||
placeholder="请输入"
|
placeholder="请输入"
|
||||||
:precision="6"
|
:precision="6"
|
||||||
|
:min="-90"
|
||||||
|
:max="90"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
/>
|
/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
|||||||
@ -63,14 +63,14 @@ const deleteModalRef = ref();
|
|||||||
const operationLogVisible = ref(false);
|
const operationLogVisible = ref(false);
|
||||||
|
|
||||||
const columns = ref<any[]>([
|
const columns = ref<any[]>([
|
||||||
{ key: 'stnm', title: '栖息地名称', dataIndex: 'stnm', visible: true, width: 260, ellipsis: true },
|
{ key: 'stnm', title: '栖息地名称', dataIndex: 'stnm', visible: true, width: 300, ellipsis: true },
|
||||||
{ key: 'stcd', title: '栖息地站码', dataIndex: 'stcd', visible: true, width: 320, ellipsis: true },
|
{ key: 'stcd', title: '栖息地站码', dataIndex: 'stcd', visible: true, width: 320, ellipsis: true },
|
||||||
{ key: 'baseName', title: '水电基地', dataIndex: 'baseName', visible: true, width: 120, ellipsis: true },
|
{ key: 'baseName', title: '水电基地', dataIndex: 'baseName', visible: true, width: 120, ellipsis: true },
|
||||||
{ key: 'ennm', title: '所属电站', dataIndex: 'ennm', visible: true, width: 150, ellipsis: true },
|
{ key: 'ennm', title: '所属电站', dataIndex: 'ennm', visible: true, width: 150, ellipsis: true },
|
||||||
{ key: 'bhdx', title: '保护对象', dataIndex: 'bhdx', visible: true, width: 240, ellipsis: true },
|
{ key: 'bhdx', title: '保护对象', dataIndex: 'bhdx', visible: true, width: 300, ellipsis: true },
|
||||||
{ key: 'bhhl', title: '保护河流', dataIndex: 'bhhl', visible: true, width: 140, ellipsis: true },
|
{ key: 'bhhl', title: '保护河流', dataIndex: 'bhhl', visible: true, width: 200, ellipsis: true },
|
||||||
{ key: 'bhhd', title: '保护河段', dataIndex: 'bhhd', visible: true, width: 240, ellipsis: true },
|
{ key: 'bhhd', title: '保护河段', dataIndex: 'bhhd', visible: true, width: 280, ellipsis: true },
|
||||||
{ key: 'bhfw', title: '保护范围', dataIndex: 'bhfw', visible: true, width: 240, ellipsis: true },
|
{ key: 'bhfw', title: '保护范围', dataIndex: 'bhfw', visible: true, width: 280, ellipsis: true },
|
||||||
{ key: 'bhhxcd', title: '保护核心长度(km)', dataIndex: 'bhhxcd', visible: true, width: 140 },
|
{ key: 'bhhxcd', title: '保护核心长度(km)', dataIndex: 'bhhxcd', visible: true, width: 140 },
|
||||||
|
|
||||||
{ key: 'bhcs', title: '保护措施', dataIndex: 'bhcs', visible: true, width: 120, ellipsis: true },
|
{ key: 'bhcs', title: '保护措施', dataIndex: 'bhcs', visible: true, width: 120, ellipsis: true },
|
||||||
@ -108,7 +108,7 @@ const deleteFhFn = async (record: any, reason: string) => deleteFhInfo({ ids: [r
|
|||||||
|
|
||||||
const handleDelete = (record: any) => { deleteModalRef.value?.open(record, () => initTable(currentSearchParams.value)); };
|
const handleDelete = (record: any) => { deleteModalRef.value?.open(record, () => initTable(currentSearchParams.value)); };
|
||||||
|
|
||||||
onMounted(() => { nextTick(() => { tableScrollY.value = calcTableScrollY(); }); });
|
onMounted(() => { nextTick(() => { tableScrollY.value = calcTableScrollY(tableRef.value); }); });
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
|||||||
@ -34,7 +34,7 @@ const columns = ref<any[]>([
|
|||||||
{ key: 'place', title: '地点', dataIndex: 'place', visible: true, width: 120, ellipsis: true },
|
{ key: 'place', title: '地点', dataIndex: 'place', visible: true, width: 120, ellipsis: true },
|
||||||
{ key: 'usflName', title: '是否启用', dataIndex: 'usflName', visible: true, width: 80, ellipsis: true },
|
{ key: 'usflName', title: '是否启用', dataIndex: 'usflName', visible: true, width: 80, ellipsis: true },
|
||||||
{ key: 'jcdt', title: '建成日期', dataIndex: 'jcdt', visible: true, width: 110, customRender: ({ text }) => { if (!text || text === '-') return '-'; const date = dayjs(text); return date.isValid() ? date.format('YYYY-MM-DD') : '-'; } },
|
{ key: 'jcdt', title: '建成日期', dataIndex: 'jcdt', visible: true, width: 110, customRender: ({ text }) => { if (!text || text === '-') return '-'; const date = dayjs(text); return date.isValid() ? date.format('YYYY-MM-DD') : '-'; } },
|
||||||
{ key: 'remark', title: '备注', dataIndex: 'remark', visible: true, ellipsis: true },
|
{ key: 'remark', title: '备注', dataIndex: 'remark', visible: true, ellipsis: true, width: 380 },
|
||||||
{ key: 'action', title: '操作', dataIndex: 'action', fixed: 'right', width: 120 }
|
{ key: 'action', title: '操作', dataIndex: 'action', fixed: 'right', width: 120 }
|
||||||
]);
|
]);
|
||||||
const tableScrollX = computed(() => Math.max(columns.value.reduce((sum: number, col: any) => sum + (col.width || 180), 0), 600));
|
const tableScrollX = computed(() => Math.max(columns.value.reduce((sum: number, col: any) => sum + (col.width || 180), 0), 600));
|
||||||
@ -48,7 +48,7 @@ const handleEdit = (record: any) => { isAdd.value = false; editRecord.value = {
|
|||||||
const handleEditSuccess = () => { initTable(currentSearchParams.value); };
|
const handleEditSuccess = () => { initTable(currentSearchParams.value); };
|
||||||
const deleteVaFn = async (record: any, reason: string) => deleteVaInfo({ ids: [record.stcd], source: reason });
|
const deleteVaFn = async (record: any, reason: string) => deleteVaInfo({ ids: [record.stcd], source: reason });
|
||||||
const handleDelete = (record: any) => { deleteModalRef.value?.open(record, () => { initTable(currentSearchParams.value); }); };
|
const handleDelete = (record: any) => { deleteModalRef.value?.open(record, () => { initTable(currentSearchParams.value); }); };
|
||||||
onMounted(() => { nextTick(() => { tableScrollY.value = calcTableScrollY(); }); });
|
onMounted(() => { nextTick(() => { tableScrollY.value = calcTableScrollY(tableRef.value); }); });
|
||||||
</script>
|
</script>
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.body_one { position: relative; z-index: 900; pointer-events: all; }
|
.body_one { position: relative; z-index: 900; pointer-events: all; }
|
||||||
|
|||||||
@ -40,12 +40,12 @@
|
|||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="8">
|
<a-col :span="8">
|
||||||
<a-form-item label="经度(°)" name="lgtd">
|
<a-form-item label="经度(°)" name="lgtd">
|
||||||
<a-input-number v-model:value="formData.lgtd" placeholder="请输入" :precision="6" style="width: 100%" />
|
<a-input-number v-model:value="formData.lgtd" placeholder="请输入" :precision="6" :min="-180" :max="180" style="width: 100%" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="8">
|
<a-col :span="8">
|
||||||
<a-form-item label="纬度(°)" name="lttd">
|
<a-form-item label="纬度(°)" name="lttd">
|
||||||
<a-input-number v-model:value="formData.lttd" placeholder="请输入" :precision="6" style="width: 100%" />
|
<a-input-number v-model:value="formData.lttd" placeholder="请输入" :precision="6" :min="-90" :max="90" style="width: 100%" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="8">
|
<a-col :span="8">
|
||||||
|
|||||||
@ -43,16 +43,14 @@ const bldsttMap: Record<number, string> = { 0: '规划', 1: '在建', 2: '已建
|
|||||||
const columns = ref<any[]>([
|
const columns = ref<any[]>([
|
||||||
{ key: 'stnm', title: '设施名称', dataIndex: 'stnm', visible: true, width: 160, fixed: 'left',ellipsis: true },
|
{ key: 'stnm', title: '设施名称', dataIndex: 'stnm', visible: true, width: 160, fixed: 'left',ellipsis: true },
|
||||||
{ key: 'stcd', title: '设施编码', dataIndex: 'stcd', visible: true, width: 180, ellipsis: true },
|
{ key: 'stcd', title: '设施编码', dataIndex: 'stcd', visible: true, width: 180, ellipsis: true },
|
||||||
{ key: 'sttpName', title: '设施类型', dataIndex: 'sttpName', visible: true, width: 100, ellipsis: true },
|
{ key: 'sttpName', title: '设施类型', dataIndex: 'sttpName', visible: true, width:120, ellipsis: true },
|
||||||
|
|
||||||
{ key: 'baseName', title: '水电基地', dataIndex: 'baseName', visible: true, width: 120, ellipsis: true },
|
{ key: 'baseName', title: '水电基地', dataIndex: 'baseName', visible: true, width: 120, ellipsis: true },
|
||||||
{ key: 'ennm', title: '所属电站', dataIndex: 'ennm', visible: true, width: 100, ellipsis: true },
|
{ key: 'ennm', title: '所属电站', dataIndex: 'ennm', visible: true, width: 100, ellipsis: true },
|
||||||
|
|
||||||
{ key: 'bldsttCode', title: '建设状态', dataIndex: 'bldsttCode', visible: true, width: 80, customRender: ({ text }) => (text !== null && text !== undefined ? (bldsttMap[text] || text) : '-') },
|
{ key: 'bldsttCode', title: '建设状态', dataIndex: 'bldsttCode', visible: true, width: 80, customRender: ({ text }) => (text !== null && text !== undefined ? (bldsttMap[text] || text) : '-') },
|
||||||
{ key: 'minFlow', title: '最小下泄流量(m³/s)', dataIndex: 'minFlow', visible: true, width: 150 },
|
{ key: 'minFlow', title: '最小下泄流量(m³/s)', dataIndex: 'minFlow', visible: true, width: 150 },
|
||||||
{ key: 'swdt', title: '开工日期', dataIndex: 'swdt', visible: true, width: 110, customRender: ({ text }) => { if (!text || text === '-') return '-'; const date = dayjs(text); return date.isValid() ? date.format('YYYY-MM-DD') : '-'; } },
|
{ key: 'swdt', title: '开工日期', dataIndex: 'swdt', visible: true, width: 110, customRender: ({ text }) => { if (!text || text === '-') return '-'; const date = dayjs(text); return date.isValid() ? date.format('YYYY-MM-DD') : '-'; } },
|
||||||
{ key: 'jcdt', title: '建成日期', dataIndex: 'jcdt', visible: true, width: 110, customRender: ({ text }) => { if (!text || text === '-') return '-'; const date = dayjs(text); return date.isValid() ? date.format('YYYY-MM-DD') : '-'; } },
|
{ key: 'jcdt', title: '建成日期', dataIndex: 'jcdt', visible: true, width: 110, customRender: ({ text }) => { if (!text || text === '-') return '-'; const date = dayjs(text); return date.isValid() ? date.format('YYYY-MM-DD') : '-'; } },
|
||||||
{ key: 'stlc', title: '站址/位置', dataIndex: 'stlc', visible: true, ellipsis: true },
|
{ key: 'stlc', title: '站址/位置', dataIndex: 'stlc', visible: true, ellipsis: true, width: 300 },
|
||||||
{ key: 'action', title: '操作', dataIndex: 'action', fixed: 'right', width: 120 }
|
{ key: 'action', title: '操作', dataIndex: 'action', fixed: 'right', width: 120 }
|
||||||
]);
|
]);
|
||||||
|
|
||||||
@ -80,7 +78,7 @@ const handleEditSuccess = () => { initTable(currentSearchParams.value); };
|
|||||||
const deleteEqFn = async (record: any, reason: string) => deleteEqInfo({ ids: [record.stcd], source: reason });
|
const deleteEqFn = async (record: any, reason: string) => deleteEqInfo({ ids: [record.stcd], source: reason });
|
||||||
const handleDelete = (record: any) => { deleteModalRef.value?.open(record, () => initTable(currentSearchParams.value)); };
|
const handleDelete = (record: any) => { deleteModalRef.value?.open(record, () => initTable(currentSearchParams.value)); };
|
||||||
|
|
||||||
onMounted(() => { nextTick(() => { tableScrollY.value = calcTableScrollY(); }); });
|
onMounted(() => { nextTick(() => { tableScrollY.value = calcTableScrollY(tableRef.value); }); });
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
|||||||
@ -39,13 +39,13 @@ const operationLogVisible = ref(false);
|
|||||||
|
|
||||||
const columns = ref<any[]>([
|
const columns = ref<any[]>([
|
||||||
{ key: 'stnm', title: '监控点名', dataIndex: 'stnm', visible: true, width: 200, ellipsis: true },
|
{ key: 'stnm', title: '监控点名', dataIndex: 'stnm', visible: true, width: 200, ellipsis: true },
|
||||||
{ key: 'stcd', title: '监控点编码', dataIndex: 'stcd', visible: true, width: 300, fixed: 'left', ellipsis: true },
|
{ key: 'stcd', title: '监控点编码', dataIndex: 'stcd', visible: true, width: 280, fixed: 'left', ellipsis: true },
|
||||||
{ key: 'sttpName', title: '监控点类型', dataIndex: 'sttpName', visible: true, width: 140, ellipsis: true },
|
{ key: 'sttpName', title: '监控点类型', dataIndex: 'sttpName', visible: true, width: 140, ellipsis: true },
|
||||||
{ key: 'baseName', title: '水电基地', dataIndex: 'baseName', visible: true, width: 120, ellipsis: true },
|
{ key: 'baseName', title: '水电基地', dataIndex: 'baseName', visible: true, width: 120, ellipsis: true },
|
||||||
{ key: 'ennm', title: '所属电站', dataIndex: 'ennm', visible: true, width: 100, ellipsis: true },
|
{ key: 'ennm', title: '所属电站', dataIndex: 'ennm', visible: true, width: 100, ellipsis: true },
|
||||||
{ key: 'addvcdName', title: '所属行政区', dataIndex: 'addvcdName', visible: true, width: 120, ellipsis: true },
|
{ key: 'addvcdName', title: '所属行政区', dataIndex: 'addvcdName', visible: true, width: 120, ellipsis: true },
|
||||||
|
|
||||||
{ key: 'stlc', title: '监控点地址', dataIndex: 'stlc', visible: true, ellipsis: true },
|
{ key: 'stlc', title: '监控点地址', dataIndex: 'stlc', visible: true, ellipsis: true , width: 280},
|
||||||
{ key: 'action', title: '操作', dataIndex: 'action', fixed: 'right', width: 120 }
|
{ key: 'action', title: '操作', dataIndex: 'action', fixed: 'right', width: 120 }
|
||||||
]);
|
]);
|
||||||
|
|
||||||
@ -73,7 +73,7 @@ const handleEditSuccess = () => { initTable(currentSearchParams.value); };
|
|||||||
const deleteVdFn = async (record: any, reason: string) => deleteVdInfo({ ids: [record.stcd], source: reason });
|
const deleteVdFn = async (record: any, reason: string) => deleteVdInfo({ ids: [record.stcd], source: reason });
|
||||||
const handleDelete = (record: any) => { deleteModalRef.value?.open(record, () => initTable(currentSearchParams.value)); };
|
const handleDelete = (record: any) => { deleteModalRef.value?.open(record, () => initTable(currentSearchParams.value)); };
|
||||||
|
|
||||||
onMounted(() => { nextTick(() => { tableScrollY.value = calcTableScrollY(); }); });
|
onMounted(() => { nextTick(() => { tableScrollY.value = calcTableScrollY(tableRef.value); }); });
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
|||||||
@ -69,7 +69,7 @@
|
|||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="12">
|
<a-col :span="12">
|
||||||
<a-form-item label="纬度(°)" name="lttd">
|
<a-form-item label="纬度(°)" name="lttd">
|
||||||
<a-input-number v-model:value="formData.lttd" placeholder="请输入" :precision="6" style="width: 100%" />
|
<a-input-number v-model:value="formData.lttd" placeholder="请输入" :precision="6" :min="-90" :max="90" style="width: 100%" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="12">
|
<a-col :span="12">
|
||||||
|
|||||||
@ -136,7 +136,7 @@ const columns = ref<any[]>([
|
|||||||
title: '站址',
|
title: '站址',
|
||||||
dataIndex: 'stlc',
|
dataIndex: 'stlc',
|
||||||
visible: true,
|
visible: true,
|
||||||
width: 240,
|
width: 300,
|
||||||
ellipsis: true
|
ellipsis: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -144,6 +144,7 @@ const columns = ref<any[]>([
|
|||||||
title: '备注',
|
title: '备注',
|
||||||
dataIndex: 'remark',
|
dataIndex: 'remark',
|
||||||
visible: true,
|
visible: true,
|
||||||
|
width: 300,
|
||||||
ellipsis: true
|
ellipsis: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -259,7 +260,7 @@ const handleDelete = (record: any) => {
|
|||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
tableScrollY.value = calcTableScrollY();
|
tableScrollY.value = calcTableScrollY(tableRef.value);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -64,12 +64,12 @@
|
|||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="12">
|
<a-col :span="12">
|
||||||
<a-form-item label="经度(°)" name="lgtd">
|
<a-form-item label="经度(°)" name="lgtd">
|
||||||
<a-input-number v-model:value="formData.lgtd" placeholder="请输入" :precision="6" style="width: 100%" />
|
<a-input-number v-model:value="formData.lgtd" placeholder="请输入" :precision="6" :min="-180" :max="180" style="width: 100%" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="12">
|
<a-col :span="12">
|
||||||
<a-form-item label="纬度(°)" name="lttd">
|
<a-form-item label="纬度(°)" name="lttd">
|
||||||
<a-input-number v-model:value="formData.lttd" placeholder="请输入" :precision="6" style="width: 100%" />
|
<a-input-number v-model:value="formData.lttd" placeholder="请输入" :precision="6" :min="-90" :max="90" style="width: 100%" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="12">
|
<a-col :span="12">
|
||||||
|
|||||||
@ -149,7 +149,8 @@ const columns = ref<any[]>([
|
|||||||
title: '站址',
|
title: '站址',
|
||||||
dataIndex: 'stlc',
|
dataIndex: 'stlc',
|
||||||
visible: true,
|
visible: true,
|
||||||
ellipsis: true
|
ellipsis: true,
|
||||||
|
width: 320
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
@ -268,7 +269,7 @@ const handleDelete = (record: any) => {
|
|||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
tableScrollY.value = calcTableScrollY();
|
tableScrollY.value = calcTableScrollY(tableRef.value);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -69,6 +69,8 @@
|
|||||||
v-model:value="formData.lgtd"
|
v-model:value="formData.lgtd"
|
||||||
placeholder="请输入"
|
placeholder="请输入"
|
||||||
:precision="6"
|
:precision="6"
|
||||||
|
:min="-180"
|
||||||
|
:max="180"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
/>
|
/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
@ -79,6 +81,8 @@
|
|||||||
v-model:value="formData.lttd"
|
v-model:value="formData.lttd"
|
||||||
placeholder="请输入"
|
placeholder="请输入"
|
||||||
:precision="6"
|
:precision="6"
|
||||||
|
:min="-90"
|
||||||
|
:max="90"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
/>
|
/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
|||||||
@ -159,7 +159,8 @@ const columns = ref<any[]>([
|
|||||||
title: '站址',
|
title: '站址',
|
||||||
dataIndex: 'stlc',
|
dataIndex: 'stlc',
|
||||||
visible: true,
|
visible: true,
|
||||||
ellipsis: true
|
ellipsis: true,
|
||||||
|
width: 280
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 'action',
|
key: 'action',
|
||||||
@ -250,7 +251,7 @@ const handleDelete = (record: any) => {
|
|||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
tableScrollY.value = calcTableScrollY();
|
tableScrollY.value = calcTableScrollY(tableRef.value);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -158,7 +158,8 @@ const columns = ref<any[]>([
|
|||||||
title: '备注',
|
title: '备注',
|
||||||
dataIndex: 'remark',
|
dataIndex: 'remark',
|
||||||
visible: true,
|
visible: true,
|
||||||
ellipsis: true
|
ellipsis: true,
|
||||||
|
width: 300,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 'action',
|
key: 'action',
|
||||||
@ -269,7 +270,7 @@ const handleDelete = (record: any) => {
|
|||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
tableScrollY.value = calcTableScrollY();
|
tableScrollY.value = calcTableScrollY(tableRef.value);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -281,7 +281,7 @@ const handleDelete = (record: any) => {
|
|||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
tableScrollY.value = calcTableScrollY();
|
tableScrollY.value = calcTableScrollY(tableRef.value);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -64,12 +64,12 @@
|
|||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="12">
|
<a-col :span="12">
|
||||||
<a-form-item label="经度(°)" name="lgtd">
|
<a-form-item label="经度(°)" name="lgtd">
|
||||||
<a-input-number v-model:value="formData.lgtd" placeholder="请输入" :precision="6" style="width: 100%" />
|
<a-input-number v-model:value="formData.lgtd" placeholder="请输入" :precision="6" :min="-180" :max="180" style="width: 100%" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="12">
|
<a-col :span="12">
|
||||||
<a-form-item label="纬度(°)" name="lttd">
|
<a-form-item label="纬度(°)" name="lttd">
|
||||||
<a-input-number v-model:value="formData.lttd" placeholder="请输入" :precision="6" style="width: 100%" />
|
<a-input-number v-model:value="formData.lttd" placeholder="请输入" :precision="6" :min="-90" :max="90" style="width: 100%" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="12">
|
<a-col :span="12">
|
||||||
|
|||||||
@ -159,7 +159,8 @@ const columns = ref<any[]>([
|
|||||||
title: '备注',
|
title: '备注',
|
||||||
dataIndex: 'remark',
|
dataIndex: 'remark',
|
||||||
visible: true,
|
visible: true,
|
||||||
ellipsis: true
|
ellipsis: true,
|
||||||
|
width: 280,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 'action',
|
key: 'action',
|
||||||
@ -274,7 +275,7 @@ const handleDelete = (record: any) => {
|
|||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
tableScrollY.value = calcTableScrollY();
|
tableScrollY.value = calcTableScrollY(tableRef.value);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -69,7 +69,7 @@
|
|||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="12">
|
<a-col :span="12">
|
||||||
<a-form-item label="纬度(°)" name="lttd">
|
<a-form-item label="纬度(°)" name="lttd">
|
||||||
<a-input-number v-model:value="formData.lttd" placeholder="请输入" :precision="6" style="width: 100%" />
|
<a-input-number v-model:value="formData.lttd" placeholder="请输入" :precision="6" :min="-90" :max="90" style="width: 100%" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="12">
|
<a-col :span="12">
|
||||||
|
|||||||
@ -159,7 +159,8 @@ const columns = ref<any[]>([
|
|||||||
title: '备注',
|
title: '备注',
|
||||||
dataIndex: 'remark',
|
dataIndex: 'remark',
|
||||||
visible: true,
|
visible: true,
|
||||||
ellipsis: true
|
ellipsis: true,
|
||||||
|
width: 320
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 'action',
|
key: 'action',
|
||||||
@ -274,7 +275,7 @@ const handleDelete = (record: any) => {
|
|||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
tableScrollY.value = calcTableScrollY();
|
tableScrollY.value = calcTableScrollY(tableRef.value);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -241,7 +241,7 @@ const handleDelete = (record: any) => {
|
|||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
tableScrollY.value = calcTableScrollY();
|
tableScrollY.value = calcTableScrollY(tableRef.value);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -26,12 +26,12 @@
|
|||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="8">
|
<a-col :span="8">
|
||||||
<a-form-item label="经度(°)" name="lgtd">
|
<a-form-item label="经度(°)" name="lgtd">
|
||||||
<a-input-number v-model:value="formData.lgtd" placeholder="请输入" :precision="6" style="width: 100%" />
|
<a-input-number v-model:value="formData.lgtd" placeholder="请输入" :precision="6" :min="-180" :max="180" style="width: 100%" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="8">
|
<a-col :span="8">
|
||||||
<a-form-item label="纬度(°)" name="lttd">
|
<a-form-item label="纬度(°)" name="lttd">
|
||||||
<a-input-number v-model:value="formData.lttd" placeholder="请输入" :precision="6" style="width: 100%" />
|
<a-input-number v-model:value="formData.lttd" placeholder="请输入" :precision="6" :min="-90" :max="90" style="width: 100%" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="8">
|
<a-col :span="8">
|
||||||
|
|||||||
@ -90,7 +90,7 @@ const handleEditSuccess = () => { initTable(currentSearchParams.value); };
|
|||||||
const deleteFbFn = async (record: any, reason: string) => deleteFbInfo({ ids: [record.stcd], source: reason });
|
const deleteFbFn = async (record: any, reason: string) => deleteFbInfo({ ids: [record.stcd], source: reason });
|
||||||
const handleDelete = (record: any) => { deleteModalRef.value?.open(record, () => initTable(currentSearchParams.value)); };
|
const handleDelete = (record: any) => { deleteModalRef.value?.open(record, () => initTable(currentSearchParams.value)); };
|
||||||
|
|
||||||
onMounted(() => { nextTick(() => { tableScrollY.value = calcTableScrollY(); }); });
|
onMounted(() => { nextTick(() => { tableScrollY.value = calcTableScrollY(tableRef.value); }); });
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
|||||||
@ -26,12 +26,12 @@
|
|||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="12">
|
<a-col :span="12">
|
||||||
<a-form-item label="经度(°)" name="lgtd">
|
<a-form-item label="经度(°)" name="lgtd">
|
||||||
<a-input-number v-model:value="formData.lgtd" placeholder="请输入" :precision="6" style="width: 100%" />
|
<a-input-number v-model:value="formData.lgtd" placeholder="请输入" :precision="6" :min="-180" :max="180" style="width: 100%" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="12">
|
<a-col :span="12">
|
||||||
<a-form-item label="纬度(°)" name="lttd">
|
<a-form-item label="纬度(°)" name="lttd">
|
||||||
<a-input-number v-model:value="formData.lttd" placeholder="请输入" :precision="6" style="width: 100%" />
|
<a-input-number v-model:value="formData.lttd" placeholder="请输入" :precision="6" :min="-90" :max="90" style="width: 100%" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="12">
|
<a-col :span="12">
|
||||||
|
|||||||
@ -43,14 +43,12 @@ const columns = ref<any[]>([
|
|||||||
{ key: 'stcd', title: '植物园编码', dataIndex: 'stcd', visible: true, width: 150, fixed: 'left', ellipsis: true },
|
{ key: 'stcd', title: '植物园编码', dataIndex: 'stcd', visible: true, width: 150, fixed: 'left', ellipsis: true },
|
||||||
{ key: 'baseName', title: '水电基地', dataIndex: 'baseName', visible: true, width: 120, ellipsis: true },
|
{ key: 'baseName', title: '水电基地', dataIndex: 'baseName', visible: true, width: 120, ellipsis: true },
|
||||||
{ key: 'ennm', title: '所属电站', dataIndex: 'ennm', visible: true, width: 150, ellipsis: true },
|
{ key: 'ennm', title: '所属电站', dataIndex: 'ennm', visible: true, width: 150, ellipsis: true },
|
||||||
|
|
||||||
|
|
||||||
{ key: 'area', title: '面积(km²)', dataIndex: 'area', visible: true, width: 120 },
|
{ key: 'area', title: '面积(km²)', dataIndex: 'area', visible: true, width: 120 },
|
||||||
{ key: 'inv', title: '投资(亿元)', dataIndex: 'inv', visible: true, width: 120 },
|
{ key: 'inv', title: '投资(亿元)', dataIndex: 'inv', visible: true, width: 120 },
|
||||||
{ key: 'swdt', title: '开工日期', dataIndex: 'swdt', visible: true, width: 110, customRender: ({ text }) => { if (!text || text === '-') return '-'; const date = dayjs(text); return date.isValid() ? date.format('YYYY-MM-DD') : '-'; } },
|
{ key: 'swdt', title: '开工日期', dataIndex: 'swdt', visible: true, width: 110, customRender: ({ text }) => { if (!text || text === '-') return '-'; const date = dayjs(text); return date.isValid() ? date.format('YYYY-MM-DD') : '-'; } },
|
||||||
{ key: 'jcdt', title: '建成日期', dataIndex: 'jcdt', visible: true, width: 110, customRender: ({ text }) => { if (!text || text === '-') return '-'; const date = dayjs(text); return date.isValid() ? date.format('YYYY-MM-DD') : '-'; } },
|
{ key: 'jcdt', title: '建成日期', dataIndex: 'jcdt', visible: true, width: 110, customRender: ({ text }) => { if (!text || text === '-') return '-'; const date = dayjs(text); return date.isValid() ? date.format('YYYY-MM-DD') : '-'; } },
|
||||||
{ key: 'bhfs', title: '保护方式', dataIndex: 'bhfs', visible: true, width: 200, ellipsis: true },
|
{ key: 'bhfs', title: '保护方式', dataIndex: 'bhfs', visible: true, width: 200, ellipsis: true },
|
||||||
{ key: 'stlc', title: '站址', dataIndex: 'stlc', visible: true, width: 200, ellipsis: true },
|
{ key: 'stlc', title: '站址', dataIndex: 'stlc', visible: true, width: 280, ellipsis: true },
|
||||||
{ key: 'action', title: '操作', dataIndex: 'action', fixed: 'right', width: 120 }
|
{ key: 'action', title: '操作', dataIndex: 'action', fixed: 'right', width: 120 }
|
||||||
]);
|
]);
|
||||||
|
|
||||||
@ -78,7 +76,7 @@ const handleEditSuccess = () => { initTable(currentSearchParams.value); };
|
|||||||
const deleteVpFn = async (record: any, reason: string) => deleteVpInfo({ ids: [record.stcd], source: reason });
|
const deleteVpFn = async (record: any, reason: string) => deleteVpInfo({ ids: [record.stcd], source: reason });
|
||||||
const handleDelete = (record: any) => { deleteModalRef.value?.open(record, () => initTable(currentSearchParams.value)); };
|
const handleDelete = (record: any) => { deleteModalRef.value?.open(record, () => initTable(currentSearchParams.value)); };
|
||||||
|
|
||||||
onMounted(() => { nextTick(() => { tableScrollY.value = calcTableScrollY(); }); });
|
onMounted(() => { nextTick(() => { tableScrollY.value = calcTableScrollY(tableRef.value); }); });
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
<div class="export-container body_one">
|
<div class="export-container body_one">
|
||||||
<a-form
|
<a-form
|
||||||
ref="formRef"
|
ref="formRef"
|
||||||
:model="formData"
|
:model="formData"
|
||||||
:labelCol="{ span: 2 }"
|
:labelCol="{ span: 2 }"
|
||||||
:wrapperCol="{ span: 18 }"
|
:wrapperCol="{ span: 18 }"
|
||||||
class="export-form"
|
class="export-form"
|
||||||
@ -97,7 +97,11 @@
|
|||||||
/>
|
/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
|
||||||
<a-form-item label="数据来源" name="dataSource" v-if="formData.timeDimension === 'month'">
|
<a-form-item
|
||||||
|
label="数据来源"
|
||||||
|
name="dataSource"
|
||||||
|
v-if="formData.timeDimension === 'month'"
|
||||||
|
>
|
||||||
<a-radio-group v-model:value="formData.dataSource">
|
<a-radio-group v-model:value="formData.dataSource">
|
||||||
<a-radio value="true">日统计表</a-radio>
|
<a-radio value="true">日统计表</a-radio>
|
||||||
<a-radio value="false">小时表</a-radio>
|
<a-radio value="false">小时表</a-radio>
|
||||||
@ -192,13 +196,14 @@
|
|||||||
<div style="display: flex; align-items: center">
|
<div style="display: flex; align-items: center">
|
||||||
<a-checkbox value="baseId">基地:</a-checkbox>
|
<a-checkbox value="baseId">基地:</a-checkbox>
|
||||||
<a-select
|
<a-select
|
||||||
v-model:value="formData.yearBaseId"
|
v-model:value="formData.rvcd"
|
||||||
placeholder="请选择水电基地"
|
placeholder="请选择水电基地"
|
||||||
mode="multiple"
|
mode="multiple"
|
||||||
allow-clear
|
allow-clear
|
||||||
show-search
|
show-search
|
||||||
:filter-option="filterOption"
|
:filter-option="filterOption"
|
||||||
:loading="rvcdLoading"
|
:loading="rvcdLoading"
|
||||||
|
@change="handleRvcdChange"
|
||||||
style="width: 200px; margin-right: 10px"
|
style="width: 200px; margin-right: 10px"
|
||||||
:max-tag-count="2"
|
:max-tag-count="2"
|
||||||
>
|
>
|
||||||
@ -291,7 +296,6 @@ const formData = reactive({
|
|||||||
yearStatContent: [] as string[],
|
yearStatContent: [] as string[],
|
||||||
statYears: [] as string[],
|
statYears: [] as string[],
|
||||||
yearDimContent: [] as string[],
|
yearDimContent: [] as string[],
|
||||||
yearBaseId: [] as string[],
|
|
||||||
lyRvcd: [] as string[],
|
lyRvcd: [] as string[],
|
||||||
dimensionStat: '',
|
dimensionStat: '',
|
||||||
content: ''
|
content: ''
|
||||||
@ -361,7 +365,7 @@ const loadStationOptions = async (rvcds?: string[]) => {
|
|||||||
const initDone = ref(false);
|
const initDone = ref(false);
|
||||||
watch(
|
watch(
|
||||||
() => JidiSelectEventStore.jidiData,
|
() => JidiSelectEventStore.jidiData,
|
||||||
(val) => {
|
val => {
|
||||||
if (initDone.value) return;
|
if (initDone.value) return;
|
||||||
const data = (val || []).filter((item: any) => item.wbsCode !== 'all');
|
const data = (val || []).filter((item: any) => item.wbsCode !== 'all');
|
||||||
if (data.length === 0) return;
|
if (data.length === 0) return;
|
||||||
@ -403,50 +407,12 @@ const loadLyOptions = async () => {
|
|||||||
lyLoading.value = false;
|
lyLoading.value = false;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
// 时间维度切换时清理表单缓存,避免残留上次的选择
|
const dataOptions = ref([
|
||||||
watch(
|
{ itemCode: 'month', dictName: '月度报表' },
|
||||||
() => formData.timeDimension,
|
{ itemCode: 'year', dictName: '年度报表' },
|
||||||
(newVal, oldVal) => {
|
{ itemCode: 'day', dictName: '日度报表' },
|
||||||
if (newVal === oldVal) return;
|
{ itemCode: 'hour', dictName: '小时报表' }
|
||||||
// 清空公共字段(基地/电站/流域)
|
]);
|
||||||
formData.rvcd = [];
|
|
||||||
formData.stations = [];
|
|
||||||
formData.lyRvcd = [];
|
|
||||||
formData.yearBaseId = [];
|
|
||||||
if (newVal === 'year') {
|
|
||||||
// 清理月度/日/时统计字段
|
|
||||||
formData.monitorElements = [];
|
|
||||||
formData.statMonths = [];
|
|
||||||
formData.dataSource = 'true';
|
|
||||||
// 恢复年统计默认值
|
|
||||||
formData.yearStatContent = ['wq', 'qec'];
|
|
||||||
formData.yearDimContent = ['stcd', 'baseId'];
|
|
||||||
formData.statYears = [String(new Date().getFullYear())];
|
|
||||||
// 恢复默认基地/水电站(避免切换后为空)
|
|
||||||
if (rvcdOptions.value.length > 0) {
|
|
||||||
formData.rvcd = [rvcdOptions.value[0].value];
|
|
||||||
formData.yearBaseId = [rvcdOptions.value[0].value];
|
|
||||||
loadStationOptions(formData.rvcd);
|
|
||||||
}
|
|
||||||
loadLyOptions();
|
|
||||||
} else {
|
|
||||||
// 清理年统计字段
|
|
||||||
formData.yearStatContent = [];
|
|
||||||
formData.statYears = [];
|
|
||||||
formData.yearDimContent = [];
|
|
||||||
// 恢复月度统计默认值
|
|
||||||
formData.statMonths = getDefaultStatMonths();
|
|
||||||
if (dataFieldOption.value.length > 0) {
|
|
||||||
formData.monitorElements = dataFieldOption.value.map((item: any) => item.itemCode);
|
|
||||||
}
|
|
||||||
if (rvcdOptions.value.length > 0) {
|
|
||||||
formData.rvcd = [rvcdOptions.value[0].value];
|
|
||||||
loadStationOptions(formData.rvcd);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
const getExstatus = async (taskId, exportParams) => {
|
const getExstatus = async (taskId, exportParams) => {
|
||||||
let res1: any = await qgcExportstatus({ taskId: taskId });
|
let res1: any = await qgcExportstatus({ taskId: taskId });
|
||||||
if (res1.status == 'PROCESSING') {
|
if (res1.status == 'PROCESSING') {
|
||||||
@ -454,12 +420,16 @@ const getExstatus = async (taskId, exportParams) => {
|
|||||||
getExstatus(taskId, exportParams);
|
getExstatus(taskId, exportParams);
|
||||||
}, 5000);
|
}, 5000);
|
||||||
} else if (res1.status == 'DONE') {
|
} else if (res1.status == 'DONE') {
|
||||||
const blob = await qgcExportdownload({ taskId: taskId, ...exportParams });
|
const blob: any = await qgcExportdownload({
|
||||||
|
taskId: taskId,
|
||||||
|
...exportParams
|
||||||
|
});
|
||||||
// 触发浏览器下载
|
// 触发浏览器下载
|
||||||
const url = window.URL.createObjectURL(blob);
|
const url = window.URL.createObjectURL(blob);
|
||||||
const a = document.createElement('a');
|
const a = document.createElement('a');
|
||||||
a.href = url;
|
a.href = url;
|
||||||
a.download = `export_${taskId}.zip`;
|
const matched = dataOptions.value.find((item:any) => item.itemCode == formData.timeDimension);
|
||||||
|
a.download =`${matched.dictName}.zip`;
|
||||||
a.click();
|
a.click();
|
||||||
window.URL.revokeObjectURL(url);
|
window.URL.revokeObjectURL(url);
|
||||||
exportLoading.value = false;
|
exportLoading.value = false;
|
||||||
@ -501,11 +471,8 @@ const handleExport = async () => {
|
|||||||
if (formData.yearDimContent.includes('stcd')) {
|
if (formData.yearDimContent.includes('stcd')) {
|
||||||
params.stcd = formData.stations.join(',');
|
params.stcd = formData.stations.join(',');
|
||||||
}
|
}
|
||||||
if (
|
if (formData.yearDimContent.includes('baseId')) {
|
||||||
formData.yearDimContent.includes('baseId') &&
|
params.baseId = formData.rvcd.join(',');
|
||||||
formData.yearBaseId.length > 0
|
|
||||||
) {
|
|
||||||
params.baseId = formData.yearBaseId.join(',');
|
|
||||||
}
|
}
|
||||||
if (formData.yearDimContent.includes('ly')) {
|
if (formData.yearDimContent.includes('ly')) {
|
||||||
params.hbRvcd = formData.lyRvcd.join(',');
|
params.hbRvcd = formData.lyRvcd.join(',');
|
||||||
@ -521,7 +488,7 @@ const handleExport = async () => {
|
|||||||
} catch (e) {
|
} catch (e) {
|
||||||
message.error('导出失败');
|
message.error('导出失败');
|
||||||
} finally {
|
} finally {
|
||||||
exportLoading.value = false;
|
// exportLoading.value = false;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
const dataFieldOption = ref([]);
|
const dataFieldOption = ref([]);
|
||||||
@ -557,4 +524,7 @@ onMounted(() => {
|
|||||||
z-index: 900;
|
z-index: 900;
|
||||||
pointer-events: all;
|
pointer-events: all;
|
||||||
}
|
}
|
||||||
|
// .export-container{
|
||||||
|
|
||||||
|
// }
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@ -171,7 +171,7 @@
|
|||||||
<a-form-item
|
<a-form-item
|
||||||
label="图片"
|
label="图片"
|
||||||
name="picpth"
|
name="picpth"
|
||||||
:label-col="{ span: 3 }"
|
:label-col="{ span: 4 }"
|
||||||
:wrapper-col="{ span: 21 }"
|
:wrapper-col="{ span: 21 }"
|
||||||
>
|
>
|
||||||
<a-upload
|
<a-upload
|
||||||
@ -196,7 +196,7 @@
|
|||||||
<a-form-item
|
<a-form-item
|
||||||
label="视频"
|
label="视频"
|
||||||
name="vdpth"
|
name="vdpth"
|
||||||
:label-col="{ span: 3 }"
|
:label-col="{ span: 4 }"
|
||||||
:wrapper-col="{ span: 21 }"
|
:wrapper-col="{ span: 21 }"
|
||||||
>
|
>
|
||||||
<a-upload
|
<a-upload
|
||||||
|
|||||||
@ -46,7 +46,7 @@
|
|||||||
width="800px"
|
width="800px"
|
||||||
>
|
>
|
||||||
<div style="text-align: center">
|
<div style="text-align: center">
|
||||||
<img :src="previewImageUrl" style="width: 100%; height: 600px" />
|
<a-image :src="previewImageUrl" style="width: 100%; height: 600px" />
|
||||||
</div>
|
</div>
|
||||||
</a-modal>
|
</a-modal>
|
||||||
|
|
||||||
@ -106,7 +106,11 @@ import EditFishDataManualModal from './EditFishDataManualModal.vue';
|
|||||||
import EditFishDataAutoModal from './EditFishDataAutoModal.vue';
|
import EditFishDataAutoModal from './EditFishDataAutoModal.vue';
|
||||||
import DeleteConfirmModal from '@/views/conventionalHydropower/BasicData/DeleteConfirmModal.vue';
|
import DeleteConfirmModal from '@/views/conventionalHydropower/BasicData/DeleteConfirmModal.vue';
|
||||||
import OperationLogModal from '@/components/OperationLogModal/index.vue';
|
import OperationLogModal from '@/components/OperationLogModal/index.vue';
|
||||||
import { getFishReleaseMonitorList, deleteFpssRInfo, deleteFpssrlRInfo } from '@/api/DataQueryMenuModule';
|
import {
|
||||||
|
getFishReleaseMonitorList,
|
||||||
|
deleteFpssRInfo,
|
||||||
|
deleteFpssrlRInfo
|
||||||
|
} from '@/api/DataQueryMenuModule';
|
||||||
import { calcTableScrollY } from '@/utils/index';
|
import { calcTableScrollY } from '@/utils/index';
|
||||||
import { useDraggable } from '@/utils/drag';
|
import { useDraggable } from '@/utils/drag';
|
||||||
|
|
||||||
@ -148,7 +152,7 @@ const deleteLabel = computed(() =>
|
|||||||
isManual.value ? '过鱼人工数据' : '过鱼自动数据'
|
isManual.value ? '过鱼人工数据' : '过鱼自动数据'
|
||||||
);
|
);
|
||||||
const operationTableName = computed(() =>
|
const operationTableName = computed(() =>
|
||||||
isManual.value ? 'SD_FPSS_R' : 'SD_FPSS_A'
|
isManual.value ? 'SD_FPSS_R' : 'SD_FPSSRL_R'
|
||||||
);
|
);
|
||||||
|
|
||||||
// 多选相关
|
// 多选相关
|
||||||
@ -557,7 +561,7 @@ const exportBtn = () => {
|
|||||||
|
|
||||||
const initTable = (values: any) => {
|
const initTable = (values: any) => {
|
||||||
console.log(values);
|
console.log(values);
|
||||||
const filters = [
|
const filters: any[] = [
|
||||||
values.rvcd && values.rvcd !== 'all'
|
values.rvcd && values.rvcd !== 'all'
|
||||||
? {
|
? {
|
||||||
field: 'rvcd',
|
field: 'rvcd',
|
||||||
@ -689,7 +693,7 @@ const handleSeeEdit = () => {
|
|||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
tableScrollY.value = calcTableScrollY();
|
tableScrollY.value = calcTableScrollY(tableRef.value);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
@ -699,4 +703,5 @@ onMounted(() => {
|
|||||||
position: relative;
|
position: relative;
|
||||||
z-index: 900;
|
z-index: 900;
|
||||||
pointer-events: all;
|
pointer-events: all;
|
||||||
}</style>
|
}
|
||||||
|
</style>
|
||||||
|
|||||||
@ -256,7 +256,7 @@ const handleDetailSuccess = () => {
|
|||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
tableScrollY.value = calcTableScrollY();
|
tableScrollY.value = calcTableScrollY(tableRef.value);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -608,7 +608,7 @@ const handleSeeEdit = () => {
|
|||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
tableScrollY.value = calcTableScrollY();
|
tableScrollY.value = calcTableScrollY(tableRef.value);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -393,7 +393,7 @@ const initTable = (values: any) => {
|
|||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
tableScrollY.value = calcTableScrollY();
|
tableScrollY.value = calcTableScrollY(tableRef.value);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user