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
package com.yiboshi.science.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.yiboshi.science.base.BaseServiceImpl;
import com.yiboshi.science.dao.ComFileDAO;
import com.yiboshi.science.dao.ComProjectManagementRuleDAO;
import com.yiboshi.science.entity.ComFile;
import com.yiboshi.science.entity.ComProjectManagementRule;
import com.yiboshi.science.param.dto.ComFileDTO;
import com.yiboshi.science.param.dto.ComProjectManagementRuleDTO;
import com.yiboshi.science.param.query.ComFileQueryVO;
import com.yiboshi.science.param.query.ComProjectManagementRuleQueryVO;
import com.yiboshi.science.service.ComFileService;
import com.yiboshi.science.service.ComProjectManagementRuleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Objects;
/**
* 单位科研项目及资金管理制度表 Service 实现类
*
* @author lkl
* @version 2021-08-26
*/
@Service
public class ComProjectManagementRuleServiceImpl extends BaseServiceImpl<ComProjectManagementRuleDAO, ComProjectManagementRuleQueryVO, ComProjectManagementRuleDTO, ComProjectManagementRule> implements ComProjectManagementRuleService {
@Autowired
private ComProjectManagementRuleDAO comProjectManagementRuleDAO;
protected void setCriteriaForQuery(ComProjectManagementRuleQueryVO vo, QueryWrapper<ComProjectManagementRuleQueryVO> criteria) {
}
@Override
public List<ComProjectManagementRuleDTO> getListByObjectId(String objectId) {
return comProjectManagementRuleDAO.getListByObjectId(objectId);
}
public void insertList(List<ComProjectManagementRuleDTO> list, String objectId) {
ComProjectManagementRule file = new ComProjectManagementRule();
file.setObjectId(objectId);
this.delete(file);
if (null != list) {
for (int i = 0; i < list.size(); i++) {
if (!isObjectNull(list.get(i))) {
list.get(i).setObjectId(objectId);
list.get(i).setShowIndex(i + 1);
list.get(i).setFileId(list.get(i).getDownloadId());
ComProjectManagementRule comProjectManagementRule = convert2Entity(list.get(i));
this.insert(comProjectManagementRule);
}
}
}
}
public void deleteByObjectId(String objectId) {
ComProjectManagementRule E = new ComProjectManagementRule();
E.setObjectId(objectId);
this.delete(E);
}
}