zhubaomin
2024-11-12 ca965778987c8f2e79831c57073035f29a851a01
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
51
package com.dy.pipIrrApp.issue;
 
import com.dy.pipIrrGlobal.daoOp.OpeIssueReportMapper;
import com.dy.pipIrrGlobal.pojoOp.OpeIssueReport;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
 
import java.util.Date;
 
/**
 * @author ZhuBaoMin
 * @date 2024-11-11 16:29
 * @LastEditTime 2024-11-11 16:29
 * @Description
 */
 
@Slf4j
@Service
public class IssueSv {
    @Autowired
    private OpeIssueReportMapper opeIssueReportMapper;
 
    /**
     * 添加巡检员问题上报
     * @param po
     * @return
     */
    public String addIssueReport(OpeIssueReport po) {
        po.setReportTime(new Date());
        po.setState((byte)1);
        opeIssueReportMapper.insert(po);
        Long issueReportId = po.getId();
        if(issueReportId == null) {
            return "巡检员问题上报失败";
        }
 
        return "success";
    }
 
    /**
     * 添加巡检员问题上报信息
     * @param po
     * @return
     */
    //public Long insertIssueReport(OpeIssueReport po) {
    //    opeIssueReportMapper.insert(po);
    //    return po.getId();
    //}
 
}