zm
2020-05-18 a18bfacbf56b401f6e0fdae8710fbca4df8cff77
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
package com.changhong.autoform.service.define.impl;
 
import java.util.List;
import org.springframework.stereotype.Service;
import com.changhong.autoform.core.spring.SpringContext;
import com.changhong.autoform.entity.CodeAndValueBean;
import com.changhong.autoform.entity.MasterData;
import com.changhong.autoform.entity.MasterDefineEntity;
import com.changhong.autoform.entity.MasterElementEntity;
import com.changhong.autoform.entity.MasterValue;
import com.changhong.autoform.entity.MasterValueEntity;
import com.changhong.autoform.mapper.define.DefineMapper;
import com.changhong.autoform.service.define.DefineService;
 
@Service("defineService")
public class DefineServiceImpl implements DefineService {
 
    private DefineMapper getDefineMapper(){
        return SpringContext.getBean(DefineMapper.class, (key)->{
            return !key.equals("simpleDefMapper");
        });
    }
    
    @Override
    public List<MasterDefineEntity> selectAllMainDef(MasterData materData) {
        return getDefineMapper().selectAllMainDef(materData);
    }
 
    @Override
    public List<MasterElementEntity> searchMainElement(MasterData materData) {
        return getDefineMapper().searchMainElement(materData);
    }
 
    @Override
    public List<CodeAndValueBean> selectCreateMainValue(MasterValue masterValue) {
        return getDefineMapper().selectCreateMainValue(masterValue);
    }
 
    @Override
    public CodeAndValueBean masterValueCodeToName(MasterValue masterValue) {
        return getDefineMapper().masterValueCodeToName(masterValue);
    }
 
}