bcaaddf8dd4e647ba8f8e178d070b9c408353185.svn-base
5.08 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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
/**
* Copyright © 2012-2014 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
*/
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.service.ServiceException;
import com.thinkgem.jeesite.modules.reg.entity.bus.RegBusBdcqzsdjxx;
import com.thinkgem.jeesite.modules.reg.entity.bus.RegBusHisHouseBdcqzsdjxx;
import com.thinkgem.jeesite.modules.reg.dao.bus.RegBusBdcqzsdjxxDao;
import com.thinkgem.jeesite.modules.reg.dao.bus.RegBusHisHouseBdcqzsdjxxDao;
/**
* 房屋历史登记数据录入Service
* @author wb
* @version 2016-03-22
*/
@Service
@Transactional(readOnly = true)
public class RegBusHisHouseBdcqzsdjxxService extends CrudService<RegBusHisHouseBdcqzsdjxxDao, RegBusHisHouseBdcqzsdjxx> {
@Autowired
private RegBusHisHouseBdcqzsdjxxDao regBusHisHouseBdcqzsdjxxDao;
@Autowired
private RegBusBdcqzsdjxxDao regBusBdcqzsdjxxDao;
public RegBusHisHouseBdcqzsdjxx get(String id) {
RegBusHisHouseBdcqzsdjxx regBusHisHouseBdcqzsdjxx = super.get(id);
return regBusHisHouseBdcqzsdjxx;
}
public void unaudit(RegBusHisHouseBdcqzsdjxx hisdjxx) {
RegBusHisHouseBdcqzsdjxx lsdjxx = new RegBusHisHouseBdcqzsdjxx();
lsdjxx.setBdcdyh(hisdjxx.getBdcdyh());
lsdjxx.setYwh(hisdjxx.getYwh());
lsdjxx.setHisok("fsh");
List<RegBusHisHouseBdcqzsdjxx> djxxlist = findList(lsdjxx);
if(djxxlist.size() > 0 ){
RegBusHisHouseBdcqzsdjxx djxx = djxxlist.get(0);
if(!"0".equals(djxx.getFshok()) || !"0".equals(djxx.getHisok())) {
throw new ServiceException("不动产单元号"+djxx.getBdcdyh()+"已被多个业务引用不能进行反审核");
}
}
hisdjxx.setIsaudit("0");
save(hisdjxx);
}
public List<RegBusHisHouseBdcqzsdjxx> findList(RegBusHisHouseBdcqzsdjxx regBusHisHouseBdcqzsdjxx) {
return super.findList(regBusHisHouseBdcqzsdjxx);
}
public Page<RegBusHisHouseBdcqzsdjxx> findPage(Page<RegBusHisHouseBdcqzsdjxx> page, RegBusHisHouseBdcqzsdjxx regBusHisHouseBdcqzsdjxx) {
return super.findPage(page, regBusHisHouseBdcqzsdjxx);
}
@Transactional(readOnly = false)
public void save(RegBusHisHouseBdcqzsdjxx regBusHisHouseBdcqzsdjxx) {
super.save(regBusHisHouseBdcqzsdjxx);
}
@Transactional(readOnly = false)
public void delete(RegBusHisHouseBdcqzsdjxx regBusHisHouseBdcqzsdjxx) {
super.delete(regBusHisHouseBdcqzsdjxx);
}
@Transactional(readOnly = false)
public RegBusHisHouseBdcqzsdjxx gethouse(String id) {
return regBusHisHouseBdcqzsdjxxDao.gethouse(id);
}
@Transactional(readOnly = false)
public Map<Object,Object> getBsst(Map<String,Object> map) {
return regBusHisHouseBdcqzsdjxxDao.getBsst(map);
}
@Transactional(readOnly = false)
public List<RegBusHisHouseBdcqzsdjxx> getBsst1(Map<String,Object> map) {
if("oracle".equals(Global.getDbName())){
return regBusHisHouseBdcqzsdjxxDao.oracleGetBsst1(map);
}else {
return regBusHisHouseBdcqzsdjxxDao.getBsst1(map);
}
}
public List<RegBusHisHouseBdcqzsdjxx> finddbzbList(RegBusHisHouseBdcqzsdjxx regBusHisHouseBdcqzsdjxx) {
return regBusHisHouseBdcqzsdjxxDao.finddbzbList(regBusHisHouseBdcqzsdjxx);
}
public void unauditDY(RegBusHisHouseBdcqzsdjxx hisdjxx) {
RegBusHisHouseBdcqzsdjxx lsdjxx = new RegBusHisHouseBdcqzsdjxx();
lsdjxx.setBdcdyh(hisdjxx.getBdcdyh());
lsdjxx.setYwh(hisdjxx.getYwh());
lsdjxx.setHisdyok("fsh");
List<RegBusHisHouseBdcqzsdjxx> djxxlist = findList(lsdjxx);
if(djxxlist.size() > 0 ){
RegBusHisHouseBdcqzsdjxx djxx = djxxlist.get(0);
if(!"0".equals(djxx.getHisdyok()) || !"0".equals(djxx.getFshok())) {
throw new ServiceException("不动产单元号"+djxx.getBdcdyh()+"不能进行反审核");
}
}
hisdjxx.setIsaudit("0");
save(hisdjxx);
}
public void unauditZY(RegBusHisHouseBdcqzsdjxx hisdjxx) {
RegBusBdcqzsdjxx lsdjxx = new RegBusBdcqzsdjxx();
lsdjxx.setBdcdyh(hisdjxx.getBdcdyh());
RegBusBdcqzsdjxx djxx = findObject(lsdjxx);
if(!djxx.getYwh().equals(hisdjxx.getYwh())) {
throw new ServiceException("不动产单元号"+djxx.getBdcdyh()+"有后续业务,不能进行反审核");
}else {
RegBusHisHouseBdcqzsdjxx djxx1 = new RegBusHisHouseBdcqzsdjxx();
djxx1.setBdcdyh(hisdjxx.getBdcdyh());
RegBusHisHouseBdcqzsdjxx djxx2 = findObjectls(lsdjxx);
if(!djxx2.getId().equals(hisdjxx.getId())){
throw new ServiceException("不动产单元号"+djxx.getBdcdyh()+"有历史后续业务,不能进行反审核");
}
}
hisdjxx.setIsaudit("0");
save(hisdjxx);
}
private RegBusHisHouseBdcqzsdjxx findObjectls(RegBusBdcqzsdjxx lsdjxx) {
// TODO Auto-generated method stub
return regBusHisHouseBdcqzsdjxxDao.findObjectls(lsdjxx);
}
private RegBusBdcqzsdjxx findObject(RegBusBdcqzsdjxx lsdjxx) {
// TODO Auto-generated method stub
return regBusBdcqzsdjxxDao.findObject(lsdjxx);
}
}