e87d14337525abf2c863f4e1f22da0126e49e76c.svn-base
3.43 KB
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
package com.thinkgem.jeesite.modules.reg.service.bus;
import java.util.List;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.thinkgem.jeesite.common.config.Global;
import com.thinkgem.jeesite.common.persistence.Page;
import com.thinkgem.jeesite.common.service.CrudService;
import com.thinkgem.jeesite.common.utils.StringUtils;
import com.thinkgem.jeesite.modules.reg.dao.base.RegBaseHisZbinfoDao;
import com.thinkgem.jeesite.modules.reg.dao.bus.RegBusHisBdcqzsdjxxDao;
import com.thinkgem.jeesite.modules.reg.dao.bus.RegBusHisHouseBdcqzsdjxxDao;
import com.thinkgem.jeesite.modules.reg.entity.base.RegBaseHisZbinfo;
import com.thinkgem.jeesite.modules.reg.entity.bus.RegBusHisBdcqzsdjxx;
import com.thinkgem.jeesite.modules.reg.entity.bus.RegBusHisHouseBdcqzsdjxx;
@Service
@Transactional(readOnly = true)
public class RegBusHisBdcqzsdjxxService extends CrudService<RegBusHisBdcqzsdjxxDao,RegBusHisBdcqzsdjxx>{
@Autowired
private RegBaseHisZbinfoDao regBaseHisZbinfoDao;
@Autowired
private RegBusHisBdcqzsdjxxDao regBusHisBdcqzsdjxxDao;
public RegBusHisBdcqzsdjxx get(String id) {
RegBusHisBdcqzsdjxx regBusHisBdcqzsdjxx = super.get(id);
regBusHisBdcqzsdjxx.setRegBaseHisZbinfoList(regBaseHisZbinfoDao.findList(new RegBaseHisZbinfo(regBusHisBdcqzsdjxx)));
return regBusHisBdcqzsdjxx;
}
public RegBusHisBdcqzsdjxx getdjxx(String id) {
return dao.getdjxx(id);
}
public List<RegBusHisBdcqzsdjxx> findList(RegBusHisBdcqzsdjxx regBusHisBdcqzsdjxx) {
return super.findList(regBusHisBdcqzsdjxx);
}
public List<RegBusHisBdcqzsdjxx> findhisdyhcflist(RegBusHisBdcqzsdjxx regBusHisBdcqzsdjxx) {
return dao.findhisdyhcflist(regBusHisBdcqzsdjxx);
}
public List<RegBusHisBdcqzsdjxx> findauditList(RegBusHisBdcqzsdjxx regBusHisBdcqzsdjxx) {
return dao.findauditList(regBusHisBdcqzsdjxx);
}
public Page<RegBusHisBdcqzsdjxx> findPage(Page<RegBusHisBdcqzsdjxx> page, RegBusHisBdcqzsdjxx regBusHisBdcqzsdjxx) {
return super.findPage(page, regBusHisBdcqzsdjxx);
}
@Transactional(readOnly = false)
public void save(RegBusHisBdcqzsdjxx regBusHisBdcqzsdjxx) {
super.save(regBusHisBdcqzsdjxx);
for (RegBaseHisZbinfo regBaseHisZbinfo : regBusHisBdcqzsdjxx.getRegBaseHisZbinfoList()){
if (regBaseHisZbinfo.getId() == null){
continue;
}
if (RegBaseHisZbinfo.DEL_FLAG_NORMAL.equals(regBaseHisZbinfo.getDelFlag())){
if (StringUtils.isBlank(regBaseHisZbinfo.getId())){
regBaseHisZbinfo.setMainId(regBusHisBdcqzsdjxx);
regBaseHisZbinfo.preInsert();
regBaseHisZbinfoDao.insert(regBaseHisZbinfo);
}else{
regBaseHisZbinfo.preUpdate();
regBaseHisZbinfoDao.update(regBaseHisZbinfo);
}
}else{
regBaseHisZbinfoDao.delete(regBaseHisZbinfo);
}
}
}
@Transactional(readOnly = false)
public void delete(RegBusHisBdcqzsdjxx regBusHisBdcqzsdjxx) {
super.delete(regBusHisBdcqzsdjxx);
}
public String findMaxYwhLs(){
return dao.findMaxYwhLs();
}
@Transactional(readOnly = false)
public Map<Object,Object> getBsst(Map<String,Object> map) {
return regBusHisBdcqzsdjxxDao.getBsst(map);
}
@Transactional(readOnly = false)
public List<RegBusHisBdcqzsdjxx> getBsst1(Map<String,Object> map) {
if("oracle".equals(Global.getDbName())){
return regBusHisBdcqzsdjxxDao.OracleGetBsst1(map);
}else {
return regBusHisBdcqzsdjxxDao.getBsst1(map);
}
}
}