田源
2023-05-09 549ecbf13b14a4deb74e42828abcd46ccb68a7c0
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
package com.vci.ubcs.omd.service;
 
import com.vci.ubcs.omd.dto.BtmTypeLinkAttributesDTO;
import com.vci.ubcs.omd.entity.BtmTypeAttribute;
import com.vci.ubcs.omd.vo.BtmTypeAttributeVO;
import org.springblade.core.log.exception.ServiceException;
import org.springblade.core.mp.base.BaseService;
 
import java.util.*;
 
/**
 * Description:业务类型关联属性的服务
 *
 * @author LiHang
 * @date 2023/4/23
 */
public interface IBtmTypeAttributeService extends BaseService<BtmTypeAttribute> {
 
    /**
     * 检查属性存在并添加
     * @param btmTypeOid 业务类型主键
     * @param attributesDTOList 页面传输对象集合
     * @param creator 创建人
     * @param now ts时间戳
     * @return 保存的显示对象
     */
    List<BtmTypeAttributeVO> checkAndInsert(String btmTypeOid, List<BtmTypeLinkAttributesDTO> attributesDTOList, String creator, Date now);
 
    /**
     * 业务类型主键查属性
     * @param btmTypeOid 业务类型主键
     * @return 查询结果
     */
    List<BtmTypeAttributeVO> getAttributeByBtmTypeOid(String btmTypeOid);
 
 
    /**
     * 根据业务类型主键获取关联的所有属性对象
     *
     * @param oidCollection 业务类型主键集合
     * @return 所有的属性对象,包括系统内置属性,key是业务类型主键,value是包含的属性
     * @throws ServiceException 业务类型不存在,参数为空或者查询出错时会抛出异常
     */
    List<BtmTypeAttributeVO> batchListHasAttributesByBtmTypeOidCollection(Collection<String> oidCollection);
 
    /**
     * 检查属性存在并删除
     * @param records 主键集合
     * @return 受影响的行数
     */
    int checkAndRemove(List<String> records);
 
    /**
     * 检查属性存在并添加
     * @param btmTypeOid 业务类型主键
     * @param attributesDTOList 页面传输对象集合
     * @param creator 创建人
     * @param now ts时间戳
     * @return 保存的显示对象
     */
    List<BtmTypeAttributeVO> checkAndUpdate(String btmTypeOid, List<BtmTypeLinkAttributesDTO> attributesDTOList, String creator, Date now);
 
    /**
     * 获取业务类型中的指定属性
     * @param id 业务类型的主键
     * @param attributeIdCollection 属性的id,若为空则获取全部
     * @return 属性的数据对象
     */
    List<BtmTypeAttribute> selectByBtmTypeIdAndAttributeIds(String id, Collection<String> attributeIdCollection);
 
    /**
     * 通过业务类型的英文名称获取关联的属性
     * @param idList 业务类型的英文名称集合
     * @return 包含的属性
     */
    List<BtmTypeAttribute> selectByBtmTypeIds(List<String> idList);
}