From d66484f149f653840da97bf8f357e0d13ef04393 Mon Sep 17 00:00:00 2001 From: zhanghan11 Date: Tue, 9 Apr 2024 18:29:55 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=90=E8=A1=8C=E7=8A=B6=E6=80=81=E6=96=B0?= =?UTF-8?q?=E9=9C=80=E6=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/constant/CacheConstants.java | 11 ++ .../datasyn/modbus/IPCPlcDataSyncThread.java | 75 +++++++----- .../ipc/domain/IpcRunningStatusRecord.java | 75 ++++++++++++ .../mapper/IpcRunningStatusRecordMapper.java | 68 +++++++++++ .../IIpcRunningStatusRecordService.java | 68 +++++++++++ .../impl/IpcAlarmRulesConfigServiceImpl.java | 6 +- .../impl/IpcMonitorFieldServiceImpl.java | 4 +- .../IpcRunningStatusRecordServiceImpl.java | 115 ++++++++++++++++++ .../ipc/IpcRunningStatusRecordMapper.xml | 65 ++++++++++ 9 files changed, 451 insertions(+), 36 deletions(-) create mode 100644 tzipc-server/tzipc-system/src/main/java/com/inspur/ipc/domain/IpcRunningStatusRecord.java create mode 100644 tzipc-server/tzipc-system/src/main/java/com/inspur/ipc/mapper/IpcRunningStatusRecordMapper.java create mode 100644 tzipc-server/tzipc-system/src/main/java/com/inspur/ipc/service/IIpcRunningStatusRecordService.java create mode 100644 tzipc-server/tzipc-system/src/main/java/com/inspur/ipc/service/impl/IpcRunningStatusRecordServiceImpl.java create mode 100644 tzipc-server/tzipc-system/src/main/resources/mapper/ipc/IpcRunningStatusRecordMapper.xml diff --git a/tzipc-server/tzipc-common/src/main/java/com/inspur/common/constant/CacheConstants.java b/tzipc-server/tzipc-common/src/main/java/com/inspur/common/constant/CacheConstants.java index 0b6dcb2..378e06b 100644 --- a/tzipc-server/tzipc-common/src/main/java/com/inspur/common/constant/CacheConstants.java +++ b/tzipc-server/tzipc-common/src/main/java/com/inspur/common/constant/CacheConstants.java @@ -70,4 +70,15 @@ public class CacheConstants * ipc缓存过期时间 */ public static final Integer IPC_EXPIRATION_TIME = 1; + + /** + * 运行状态 + */ + public static final String RUNNING_STATUS = "running_status:"; + + + /** + * ipc前缀 + */ + public static final String IPC_PREFIX = "ipc:"; } diff --git a/tzipc-server/tzipc-datasyn/src/main/java/com/inspur/datasyn/modbus/IPCPlcDataSyncThread.java b/tzipc-server/tzipc-datasyn/src/main/java/com/inspur/datasyn/modbus/IPCPlcDataSyncThread.java index 33974cb..dc0ce03 100644 --- a/tzipc-server/tzipc-datasyn/src/main/java/com/inspur/datasyn/modbus/IPCPlcDataSyncThread.java +++ b/tzipc-server/tzipc-datasyn/src/main/java/com/inspur/datasyn/modbus/IPCPlcDataSyncThread.java @@ -1,13 +1,16 @@ package com.inspur.datasyn.modbus; import com.inspur.common.constant.CacheConstants; +import com.inspur.common.utils.StringUtils; import com.inspur.common.utils.spring.SpringUtils; import com.inspur.ipc.domain.IpcAlarmRecord; import com.inspur.ipc.domain.IpcAlarmRulesConfig; import com.inspur.ipc.domain.IpcMonitorField; +import com.inspur.ipc.domain.IpcRunningStatusRecord; import com.inspur.ipc.service.IIpcAlarmRecordService; import com.inspur.ipc.service.IIpcAlarmRulesConfigService; import com.inspur.ipc.service.IIpcMonitorFieldService; +import com.inspur.ipc.service.IIpcRunningStatusRecordService; import com.inspur.ipc.utils.IpcConstant; import com.inspur.ipc.utils.IpcUtil; import com.inspur.system.service.influx.InfluxDBService; @@ -42,6 +45,7 @@ public class IPCPlcDataSyncThread implements Runnable { IpcUtil ipcUtil = SpringUtils.getBean(IpcUtil.class); IIpcAlarmRulesConfigService iIpcAlarmRulesConfigService = SpringUtils.getBean(IIpcAlarmRulesConfigService.class); InfluxDBService i = SpringUtils.getBean(InfluxDBService.class); + IIpcRunningStatusRecordService iIpcRunningStatusRecordService = SpringUtils.getBean(IIpcRunningStatusRecordService.class); /* BatchRead batch = new BatchRead(); batch.addLocator(0, BaseLocator.holdingRegister(1, 0, DataType.FOUR_BYTE_FLOAT_SWAPPED));// 进油压力,float @@ -63,24 +67,28 @@ public class IPCPlcDataSyncThread implements Runnable { batch.addLocator(16, BaseLocator.holdingRegister(1, 29, DataType.TWO_BYTE_INT_UNSIGNED));// 颗粒度21um,int batch.setContiguousRequests(false); BatchResults results = master.send(batch);*/ - // TODO 获取运行状态 - // 不一致则更新运行状态 - /** - * 温压数据 - */ - List partList = iIpcMonitorFieldService.selectFieldDataByType(CacheConstants.MONITOR_PART_KEY); - List plcList = iIpcMonitorFieldService.selectFieldDataByType(CacheConstants.PLC_MONITOR_PARAMS_KEY); - List alarmRecordList = new ArrayList<>(); - // 字典数据列表集合 - for (IpcMonitorField part : partList) { - Map tags = new TreeMap(); - tags.put("part", part.getFieldValue()); - Map fields = new TreeMap(); - for (IpcMonitorField field : plcList) { - // 可以配置源字段,获取时通过源字段获取数据 - // field.getSourceField() - fields.put(field.getFieldValue(), Math.random()); - } + // 获取运行状态,不一致则新增运行状态 + String status = iIpcRunningStatusRecordService.selectLatestStatus(); + if(StringUtils.isNull(status) || !status.equals("4")){ + status="4"; + iIpcRunningStatusRecordService.insertIpcRunningStatusRecord(new IpcRunningStatusRecord(status)); + } + // 如果不是停机数据,进行处理 + if(!IpcConstant.RUNNING_STATUS_SHUTDOWN.equals(status)) { + // 温压数据 + List partList = iIpcMonitorFieldService.selectFieldDataByType(CacheConstants.MONITOR_PART_KEY); + List plcList = iIpcMonitorFieldService.selectFieldDataByType(CacheConstants.PLC_MONITOR_PARAMS_KEY); + List alarmRecordList = new ArrayList<>(); + // 字典数据列表集合 + for (IpcMonitorField part : partList) { + Map tags = new TreeMap(); + tags.put("part", part.getFieldValue()); + Map fields = new TreeMap(); + for (IpcMonitorField field : plcList) { + // 可以配置源字段,获取时通过源字段获取数据 + // field.getSourceField() + fields.put(field.getFieldValue(), Math.random()); + } // //颗粒度4μm // fields.put("pz4", (float) 0 + Math.random()); // //颗粒度6μm @@ -107,19 +115,24 @@ public class IPCPlcDataSyncThread implements Runnable { // fields.put("vy", (float) 0 + Math.random()); // //振动z轴 // fields.put("vz", (float) 0 + Math.random()); - SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss:SSS"); - String format = simpleDateFormat.format(new Date()); - fields.put("insertTime", format); - // TODO 根据报警规则校验 - // 根据运行状态获取规则 - List rulesConfigList = iIpcAlarmRulesConfigService.selectIpcAlarmRulesConfigList(tags.get("part")); - rulesConfigList = rulesConfigList.stream().filter(ipcAlarmRulesConfig -> ipcAlarmRulesConfig.getType().equals(IpcConstant.RULE_TYPE_IN_RUNNING)).collect(Collectors.toList()); - alarmRecordList.addAll(ipcUtil.dealRealTimeData(fields, tags, CacheConstants.PLC_MONITOR_PARAMS_KEY,rulesConfigList)); - i.insert(IpcConstant.PLC_MEASUREMENT, tags, fields); - } - // 批量保存报警数据 - if (!alarmRecordList.isEmpty()) { - iIpcAlarmRecordService.batchInsertIpcAlarmRecord(alarmRecordList); + SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss:SSS"); + String format = simpleDateFormat.format(new Date()); + fields.put("insertTime", format); + // 根据运行状态获取规则 + List rulesConfigList = iIpcAlarmRulesConfigService.selectIpcAlarmRulesConfigList(tags.get("part")); + if(IpcConstant.RUNNING_STATUS_RUNNING.equals(status)){ + rulesConfigList = rulesConfigList.stream().filter(ipcAlarmRulesConfig -> ipcAlarmRulesConfig.getType().equals(IpcConstant.RULE_TYPE_IN_RUNNING)).collect(Collectors.toList()); + }else{ + rulesConfigList = rulesConfigList.stream().filter(ipcAlarmRulesConfig -> ipcAlarmRulesConfig.getType().equals(IpcConstant.RULE_TYPE_TRIAL_RUN)).collect(Collectors.toList()); + } + // 根据报警规则校验 + alarmRecordList.addAll(ipcUtil.dealRealTimeData(fields, tags, CacheConstants.PLC_MONITOR_PARAMS_KEY, rulesConfigList)); + i.insert(IpcConstant.PLC_MEASUREMENT, tags, fields); + } + // 批量保存报警数据 + if (!alarmRecordList.isEmpty()) { + iIpcAlarmRecordService.batchInsertIpcAlarmRecord(alarmRecordList); + } } } catch (Exception e) { logger.info("数据处理失败,时间{},{}", new Date(), e.getMessage()); diff --git a/tzipc-server/tzipc-system/src/main/java/com/inspur/ipc/domain/IpcRunningStatusRecord.java b/tzipc-server/tzipc-system/src/main/java/com/inspur/ipc/domain/IpcRunningStatusRecord.java new file mode 100644 index 0000000..450b473 --- /dev/null +++ b/tzipc-server/tzipc-system/src/main/java/com/inspur/ipc/domain/IpcRunningStatusRecord.java @@ -0,0 +1,75 @@ +package com.inspur.ipc.domain; + +import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.inspur.common.annotation.Excel; +import com.inspur.common.core.domain.BaseEntity; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + * 运行状态记录对象 ipc_running_status_record + * + * @author inspur + * @date 2024-04-09 + */ +public class IpcRunningStatusRecord extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 主键 */ + private Long id; + + /** 运行状态 */ + @Excel(name = "运行状态") + private String runningStatus; + + /** 开始时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "开始时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date startTime; + + public void setId(Long id) + { + this.id = id; + } + + public Long getId() + { + return id; + } + public void setRunningStatus(String runningStatus) + { + this.runningStatus = runningStatus; + } + + public String getRunningStatus() + { + return runningStatus; + } + public void setStartTime(Date startTime) + { + this.startTime = startTime; + } + + public Date getStartTime() + { + return startTime; + } + + public IpcRunningStatusRecord() { + } + + public IpcRunningStatusRecord(String runningStatus) { + this.runningStatus = runningStatus; + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("runningStatus", getRunningStatus()) + .append("startTime", getStartTime()) + .toString(); + } +} diff --git a/tzipc-server/tzipc-system/src/main/java/com/inspur/ipc/mapper/IpcRunningStatusRecordMapper.java b/tzipc-server/tzipc-system/src/main/java/com/inspur/ipc/mapper/IpcRunningStatusRecordMapper.java new file mode 100644 index 0000000..a778710 --- /dev/null +++ b/tzipc-server/tzipc-system/src/main/java/com/inspur/ipc/mapper/IpcRunningStatusRecordMapper.java @@ -0,0 +1,68 @@ +package com.inspur.ipc.mapper; + +import java.util.List; +import com.inspur.ipc.domain.IpcRunningStatusRecord; + +/** + * 运行状态记录Mapper接口 + * + * @author inspur + * @date 2024-04-09 + */ +public interface IpcRunningStatusRecordMapper +{ + /** + * 查询运行状态记录 + * + * @param id 运行状态记录主键 + * @return 运行状态记录 + */ + public IpcRunningStatusRecord selectIpcRunningStatusRecordById(Long id); + + /** + * 查询运行状态记录列表 + * + * @param ipcRunningStatusRecord 运行状态记录 + * @return 运行状态记录集合 + */ + public List selectIpcRunningStatusRecordList(IpcRunningStatusRecord ipcRunningStatusRecord); + + /** + * 新增运行状态记录 + * + * @param ipcRunningStatusRecord 运行状态记录 + * @return 结果 + */ + public int insertIpcRunningStatusRecord(IpcRunningStatusRecord ipcRunningStatusRecord); + + /** + * 修改运行状态记录 + * + * @param ipcRunningStatusRecord 运行状态记录 + * @return 结果 + */ + public int updateIpcRunningStatusRecord(IpcRunningStatusRecord ipcRunningStatusRecord); + + /** + * 删除运行状态记录 + * + * @param id 运行状态记录主键 + * @return 结果 + */ + public int deleteIpcRunningStatusRecordById(Long id); + + /** + * 批量删除运行状态记录 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteIpcRunningStatusRecordByIds(Long[] ids); + + /** + * 查询最新状态 + * + * @return 结果 + */ + String selectLatestStatus(); +} diff --git a/tzipc-server/tzipc-system/src/main/java/com/inspur/ipc/service/IIpcRunningStatusRecordService.java b/tzipc-server/tzipc-system/src/main/java/com/inspur/ipc/service/IIpcRunningStatusRecordService.java new file mode 100644 index 0000000..1c9e1fd --- /dev/null +++ b/tzipc-server/tzipc-system/src/main/java/com/inspur/ipc/service/IIpcRunningStatusRecordService.java @@ -0,0 +1,68 @@ +package com.inspur.ipc.service; + +import java.util.List; +import com.inspur.ipc.domain.IpcRunningStatusRecord; + +/** + * 运行状态记录Service接口 + * + * @author inspur + * @date 2024-04-09 + */ +public interface IIpcRunningStatusRecordService +{ + /** + * 查询运行状态记录 + * + * @param id 运行状态记录主键 + * @return 运行状态记录 + */ + public IpcRunningStatusRecord selectIpcRunningStatusRecordById(Long id); + + /** + * 查询运行状态记录列表 + * + * @param ipcRunningStatusRecord 运行状态记录 + * @return 运行状态记录集合 + */ + public List selectIpcRunningStatusRecordList(IpcRunningStatusRecord ipcRunningStatusRecord); + + /** + * 新增运行状态记录 + * + * @param ipcRunningStatusRecord 运行状态记录 + * @return 结果 + */ + public int insertIpcRunningStatusRecord(IpcRunningStatusRecord ipcRunningStatusRecord); + + /** + * 修改运行状态记录 + * + * @param ipcRunningStatusRecord 运行状态记录 + * @return 结果 + */ + public int updateIpcRunningStatusRecord(IpcRunningStatusRecord ipcRunningStatusRecord); + + /** + * 批量删除运行状态记录 + * + * @param ids 需要删除的运行状态记录主键集合 + * @return 结果 + */ + public int deleteIpcRunningStatusRecordByIds(Long[] ids); + + /** + * 删除运行状态记录信息 + * + * @param id 运行状态记录主键 + * @return 结果 + */ + public int deleteIpcRunningStatusRecordById(Long id); + + /** + * 查询最新状态 + * + * @return 结果 + */ + String selectLatestStatus(); +} diff --git a/tzipc-server/tzipc-system/src/main/java/com/inspur/ipc/service/impl/IpcAlarmRulesConfigServiceImpl.java b/tzipc-server/tzipc-system/src/main/java/com/inspur/ipc/service/impl/IpcAlarmRulesConfigServiceImpl.java index f0cc2a3..d6de762 100644 --- a/tzipc-server/tzipc-system/src/main/java/com/inspur/ipc/service/impl/IpcAlarmRulesConfigServiceImpl.java +++ b/tzipc-server/tzipc-system/src/main/java/com/inspur/ipc/service/impl/IpcAlarmRulesConfigServiceImpl.java @@ -106,7 +106,7 @@ public class IpcAlarmRulesConfigServiceImpl implements IIpcAlarmRulesConfigServi List list = ipcAlarmRulesConfigMapper.selectIpcAlarmRulesConfigList(new IpcAlarmRulesConfig()); for (IpcMonitorField field : partList) { List redisList = list.stream().filter(ipcAlarmRulesConfig -> ipcAlarmRulesConfig.getPartKey().equals(field.getFieldValue())).collect(Collectors.toList()); - redisCache.setCacheObject(CacheConstants.RULE_CONFIG + field.getFieldValue(), redisList,CacheConstants.IPC_EXPIRATION_TIME, TimeUnit.HOURS); + redisCache.setCacheObject(CacheConstants.IPC_PREFIX+CacheConstants.RULE_CONFIG + field.getFieldValue(), redisList,CacheConstants.IPC_EXPIRATION_TIME, TimeUnit.HOURS); } } @@ -118,11 +118,11 @@ public class IpcAlarmRulesConfigServiceImpl implements IIpcAlarmRulesConfigServi */ @Override public List selectIpcAlarmRulesConfigList(String part) { - List list = redisCache.getCacheObject(CacheConstants.RULE_CONFIG + part); + List list = redisCache.getCacheObject(CacheConstants.IPC_PREFIX+CacheConstants.RULE_CONFIG + part); if (list == null || list.isEmpty()) { this.updateRedisCache(); } - list = redisCache.getCacheObject(CacheConstants.RULE_CONFIG + part); + list = redisCache.getCacheObject(CacheConstants.IPC_PREFIX+CacheConstants.RULE_CONFIG + part); return list; } } diff --git a/tzipc-server/tzipc-system/src/main/java/com/inspur/ipc/service/impl/IpcMonitorFieldServiceImpl.java b/tzipc-server/tzipc-system/src/main/java/com/inspur/ipc/service/impl/IpcMonitorFieldServiceImpl.java index 3dc2ff5..ac927ce 100644 --- a/tzipc-server/tzipc-system/src/main/java/com/inspur/ipc/service/impl/IpcMonitorFieldServiceImpl.java +++ b/tzipc-server/tzipc-system/src/main/java/com/inspur/ipc/service/impl/IpcMonitorFieldServiceImpl.java @@ -99,10 +99,10 @@ public class IpcMonitorFieldServiceImpl implements IIpcMonitorFieldService { */ @Override public List selectFieldDataByType(String type) { - List list = redisCache.getCacheObject(type + CacheConstants.REDIS_KEY_SEPARATOR); + List list = redisCache.getCacheObject(CacheConstants.IPC_PREFIX+type + CacheConstants.REDIS_KEY_SEPARATOR); if (list == null || list.isEmpty()) { list = ipcMonitorFieldMapper.selectFieldDataByType(type); - redisCache.setCacheObject(type + CacheConstants.REDIS_KEY_SEPARATOR, list,CacheConstants.IPC_EXPIRATION_TIME, TimeUnit.HOURS); + redisCache.setCacheObject(CacheConstants.IPC_PREFIX+type + CacheConstants.REDIS_KEY_SEPARATOR, list,CacheConstants.IPC_EXPIRATION_TIME, TimeUnit.HOURS); } return list; } diff --git a/tzipc-server/tzipc-system/src/main/java/com/inspur/ipc/service/impl/IpcRunningStatusRecordServiceImpl.java b/tzipc-server/tzipc-system/src/main/java/com/inspur/ipc/service/impl/IpcRunningStatusRecordServiceImpl.java new file mode 100644 index 0000000..5196e73 --- /dev/null +++ b/tzipc-server/tzipc-system/src/main/java/com/inspur/ipc/service/impl/IpcRunningStatusRecordServiceImpl.java @@ -0,0 +1,115 @@ +package com.inspur.ipc.service.impl; + +import java.util.List; +import java.util.concurrent.TimeUnit; + +import com.inspur.common.constant.CacheConstants; +import com.inspur.common.core.redis.RedisCache; +import com.inspur.common.utils.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.inspur.ipc.mapper.IpcRunningStatusRecordMapper; +import com.inspur.ipc.domain.IpcRunningStatusRecord; +import com.inspur.ipc.service.IIpcRunningStatusRecordService; + +/** + * 运行状态记录Service业务层处理 + * + * @author inspur + * @date 2024-04-09 + */ +@Service +public class IpcRunningStatusRecordServiceImpl implements IIpcRunningStatusRecordService +{ + @Autowired + private IpcRunningStatusRecordMapper ipcRunningStatusRecordMapper; + @Autowired + private RedisCache redisCache; + /** + * 查询运行状态记录 + * + * @param id 运行状态记录主键 + * @return 运行状态记录 + */ + @Override + public IpcRunningStatusRecord selectIpcRunningStatusRecordById(Long id) + { + return ipcRunningStatusRecordMapper.selectIpcRunningStatusRecordById(id); + } + + /** + * 查询运行状态记录列表 + * + * @param ipcRunningStatusRecord 运行状态记录 + * @return 运行状态记录 + */ + @Override + public List selectIpcRunningStatusRecordList(IpcRunningStatusRecord ipcRunningStatusRecord) + { + return ipcRunningStatusRecordMapper.selectIpcRunningStatusRecordList(ipcRunningStatusRecord); + } + + /** + * 新增运行状态记录 + * + * @param ipcRunningStatusRecord 运行状态记录 + * @return 结果 + */ + @Override + public int insertIpcRunningStatusRecord(IpcRunningStatusRecord ipcRunningStatusRecord) + { + int num = ipcRunningStatusRecordMapper.insertIpcRunningStatusRecord(ipcRunningStatusRecord); + selectLatestStatus(); + return num; + } + + /** + * 修改运行状态记录 + * + * @param ipcRunningStatusRecord 运行状态记录 + * @return 结果 + */ + @Override + public int updateIpcRunningStatusRecord(IpcRunningStatusRecord ipcRunningStatusRecord) + { + return ipcRunningStatusRecordMapper.updateIpcRunningStatusRecord(ipcRunningStatusRecord); + } + + /** + * 批量删除运行状态记录 + * + * @param ids 需要删除的运行状态记录主键 + * @return 结果 + */ + @Override + public int deleteIpcRunningStatusRecordByIds(Long[] ids) + { + return ipcRunningStatusRecordMapper.deleteIpcRunningStatusRecordByIds(ids); + } + + /** + * 删除运行状态记录信息 + * + * @param id 运行状态记录主键 + * @return 结果 + */ + @Override + public int deleteIpcRunningStatusRecordById(Long id) + { + return ipcRunningStatusRecordMapper.deleteIpcRunningStatusRecordById(id); + } + /** + * 查询最新状态 + * + * @return 结果 + */ + @Override + public String selectLatestStatus(){ + String status = redisCache.getCacheObject(CacheConstants.IPC_PREFIX+CacheConstants.RUNNING_STATUS); + if(StringUtils.isNull(status) || StringUtils.isEmpty(status)){ + status = ipcRunningStatusRecordMapper.selectLatestStatus(); + redisCache.setCacheObject(CacheConstants.IPC_PREFIX+CacheConstants.RUNNING_STATUS,status,CacheConstants.IPC_EXPIRATION_TIME, TimeUnit.HOURS); + } + return status; + } +} diff --git a/tzipc-server/tzipc-system/src/main/resources/mapper/ipc/IpcRunningStatusRecordMapper.xml b/tzipc-server/tzipc-system/src/main/resources/mapper/ipc/IpcRunningStatusRecordMapper.xml new file mode 100644 index 0000000..a751eff --- /dev/null +++ b/tzipc-server/tzipc-system/src/main/resources/mapper/ipc/IpcRunningStatusRecordMapper.xml @@ -0,0 +1,65 @@ + + + + + + + + + + + + select id, running_status, start_time from ipc_running_status_record + + + + + + + + insert into ipc_running_status_record + + running_status, + start_time + + + #{runningStatus}, + SYSDATE() + + + + + update ipc_running_status_record + + running_status = #{runningStatus}, + start_time = #{startTime}, + + where id = #{id} + + + + delete from ipc_running_status_record where id = #{id} + + + + delete from ipc_running_status_record where id in + + #{id} + + + + +