YcslGxrService.java
2.35 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
/**
* Copyright © 2012-2014 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
*/
package com.thinkgem.jeesite.modules.ycsl.service;
import java.util.List;
import java.util.Map;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.google.common.collect.Maps;
import com.thinkgem.jeesite.common.persistence.Page;
import com.thinkgem.jeesite.common.service.CrudService;
import com.thinkgem.jeesite.modules.ycsl.entity.YcslGxr;
import com.thinkgem.jeesite.modules.ycsl.entity.YcslJbxx;
import com.thinkgem.jeesite.modules.reg.web.httprest.httpRestService.HttpactivityService;
import com.thinkgem.jeesite.modules.ycsl.dao.YcslGxrDao;
/**
* 一窗受理-关系人Service
* @author lzj
* @version 2020-12-24
*/
@Service
@Transactional(readOnly = true)
public class YcslGxrService extends CrudService<YcslGxrDao, YcslGxr> {
@Lazy
@Autowired
private YcslJbxxService ycslJbxxService;
@Autowired
private HttpactivityService httpactivityService;
public YcslGxr get(String id) {
return super.get(id);
}
public List<YcslGxr> findList(YcslGxr ycslGxr) {
return super.findList(ycslGxr);
}
public List<YcslGxr> findList_1(YcslGxr ycslGxr1) {
return super.findList_1(ycslGxr1);
}
public Page<YcslGxr> findPage(Page<YcslGxr> page, YcslGxr ycslGxr) {
return super.findPage(page, ycslGxr);
}
@Transactional(readOnly = false)
public void save(YcslGxr ycslGxr) {
super.save(ycslGxr);
}
@Transactional(readOnly = false)
public void delete(YcslGxr ycslGxr) {
super.delete(ycslGxr);
}
@Transactional(readOnly = false)
public void deleteByproid(String proid) {
dao.deleteByproid(proid);
}
@Transactional(readOnly = false)
public void saveGxr(YcslGxr ycslGxr) {
YcslJbxx jbxx = ycslJbxxService.get(ycslGxr.getProid());
Map map = Maps.newHashMap();
if(StringUtils.isNotBlank(jbxx.getZt())) {
map = ycslJbxxService.getMap(jbxx);
try {
Map json = httpactivityService.postRequest(map,"updateSL");
jbxx.setZt("true");
ycslJbxxService.save(jbxx);
} catch (Exception e) {
jbxx.setZt("false");
ycslJbxxService.save(jbxx);
e.printStackTrace();
}
}
save(ycslGxr);
}
}