fix: 垂向水温优化
This commit is contained in:
parent
dd48776d91
commit
bb7ec04a38
@ -252,7 +252,7 @@ public class SdWtvtRServiceImpl extends ServiceImpl<SdWtvtRMapper, SdWtvtYearVo>
|
||||
}
|
||||
batchUpdateWtvtRData(dataList);
|
||||
if (CollUtil.isNotEmpty(logDetails)) {
|
||||
MsOperationLog mainLog = buildWtvtMainLog( stcd,"修改垂向水温数据", source);
|
||||
MsOperationLog mainLog = buildWtvtMainLog( stcd,"修改垂向水温数据", source,"02");
|
||||
msOperationLogMapper.insert(mainLog);
|
||||
for (MsOperationLogDetail detail : logDetails) {
|
||||
detail.setMainId(mainLog.getId());
|
||||
@ -438,12 +438,12 @@ public class SdWtvtRServiceImpl extends ServiceImpl<SdWtvtRMapper, SdWtvtYearVo>
|
||||
List<Object> params = new ArrayList<>();
|
||||
List<String> conditions = new ArrayList<>();
|
||||
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;
|
||||
}
|
||||
conditions.add("(STCD = ? AND TM = TO_DATE(SUBSTR(?, 1, 19), 'YYYY-MM-DD HH24:MI:SS'))");
|
||||
params.add(item.getId());
|
||||
params.add(item.getDt());
|
||||
params.add(item.getTm());
|
||||
}
|
||||
if (conditions.isEmpty()) {
|
||||
return new ArrayList<>();
|
||||
@ -487,12 +487,13 @@ public class SdWtvtRServiceImpl extends ServiceImpl<SdWtvtRMapper, SdWtvtYearVo>
|
||||
if (CollUtil.isEmpty(rows)) {
|
||||
return;
|
||||
}
|
||||
MsOperationLog mainLog = buildWtvtMainLog(null,remark, source);
|
||||
msOperationLogMapper.insert(mainLog);
|
||||
List<MsOperationLogDetail> details = new ArrayList<>();
|
||||
for (Map<String, Object> row : rows) {
|
||||
String stcd = asString(row.get("STCD"));
|
||||
// String recordId = asString(row.get("ID"));
|
||||
Object depth = row.get("WTHG");
|
||||
MsOperationLog mainLog = buildWtvtMainLog(stcd, remark, source, "03");
|
||||
msOperationLogMapper.insert(mainLog);
|
||||
for (Map.Entry<String, Object> entry : row.entrySet()) {
|
||||
String fieldCode = entry.getKey();
|
||||
Object oldValue = entry.getValue();
|
||||
@ -507,11 +508,12 @@ public class SdWtvtRServiceImpl extends ServiceImpl<SdWtvtRMapper, SdWtvtYearVo>
|
||||
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();
|
||||
log.setOperator(resolveWtvtLogOperator());
|
||||
log.setOperateTime(new Date());
|
||||
log.setTableName(WT_CX_TABLE_NAME);
|
||||
log.setOperationType(operationType);
|
||||
log.setRecordId(recordId);
|
||||
log.setSource(StringUtils.trimToNull(source));
|
||||
log.setRemark(remark);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user