whycxzp
2022-07-14 d66668e857fbb0343febc86ae16653a66ceee4ae
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
package com.whyc.service;
 
import com.whyc.mapper.WorksheetLinkMapper;
import com.whyc.mapper.WorksheetMainMapper;
import com.whyc.pojo.WorksheetLink;
import com.whyc.pojo.WorksheetMain;
import org.springframework.stereotype.Service;
 
import javax.annotation.Resource;
 
@Service
public class WorksheetMainService {
 
    @Resource
    private WorksheetMainMapper mainMapper;
 
    @Resource
    private WorksheetLinkMapper linkMapper;
 
    public void submit(WorksheetMain main) {
        //提交工单主表
        mainMapper.insert(main);
        //提交工单子表
        WorksheetLink link =new WorksheetLink();
        link.setMainId(main.getId());
        link.setParentId(0);
        link.setDealUserId(main.getNextUser());
        link.setDealType(1);
        link.setDealDesc(main.getDealDesc());
        link.setLinkStatus(0);
        link.setEnableArchive(0);
        linkMapper.insert(link);
    }
}