1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
package com.dy.pipIrrRemote.monitor.common;
 
import com.dy.pipIrrGlobal.command.Command4MqttSv;
import com.dy.pipIrrGlobal.daoPr.PrStManureMapper;
import com.dy.pipIrrGlobal.daoRm.RmCommandHistoryMapper;
import com.dy.pipIrrGlobal.pojoPr.PrStManure;
import com.dy.pipIrrGlobal.pojoRm.RmCommandHistory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
 
/**
 * @Author: liurunyu
 * @Date: 2025/5/9 14:45
 * @Description
 */
public class Com4MqttSv extends Command4MqttSv {
 
    @Autowired
    protected PrStManureMapper prStManureDao ;
    @Autowired
    protected RmCommandHistoryMapper rmCommandHistoryDao ;
 
    public PrStManure getManure(Long manureId){
        return this.getManure(prStManureDao, manureId);
    }
    /**
     * 创建命令日志对象
     *
     * @param comId       主键
     * @param commandCode 功能码
     * @param rtuAddr     阀控器地址
     * @param protocol    通讯协议名称
     * @param param       参数数据
     * @param operator    操作员
     * @return
     */
    @Transactional(rollbackFor = Exception.class)
    public RmCommandHistory saveComHistoryPo(Long comId,
                                             String protocol,
                                             String commandCode,
                                             String commandName,
                                             Long manureId,
                                             String rtuAddr,
                                             Object param,
                                             Long operator) {
        return this.saveComHistoryPo(rmCommandHistoryDao, comId, protocol, commandCode, commandName, manureId, rtuAddr, param, operator) ;
    }
 
 
}