|
@@ -4,11 +4,14 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
4
|
4
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
5
|
5
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
6
|
6
|
import com.yunzhi.marketing.base.ResponseBean;
|
|
7
|
+import com.yunzhi.marketing.common.CommConstant;
|
7
|
8
|
import com.yunzhi.marketing.entity.TaBuildingProjectType;
|
|
9
|
+import com.yunzhi.marketing.entity.TdBuildingType;
|
8
|
10
|
import com.yunzhi.marketing.service.ITaBuildingProjectTypeService;
|
9
|
11
|
import com.yunzhi.marketing.service.ITaPersonBuildingService;
|
10
|
12
|
import com.yunzhi.marketing.service.ITaPersonService;
|
11
|
13
|
import com.yunzhi.marketing.base.BaseController;
|
|
14
|
+import com.yunzhi.marketing.service.ITdBuildingTypeService;
|
12
|
15
|
import org.slf4j.Logger;
|
13
|
16
|
import org.slf4j.LoggerFactory;
|
14
|
17
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -43,6 +46,9 @@ public class TaBuildingProjectTypeController extends BaseController {
|
43
|
46
|
@Autowired
|
44
|
47
|
private ITaPersonService iTaPersonService;
|
45
|
48
|
|
|
49
|
+ @Autowired
|
|
50
|
+ private ITdBuildingTypeService iTdBuildingTypeService;
|
|
51
|
+
|
46
|
52
|
|
47
|
53
|
/**
|
48
|
54
|
* 分页查询列表
|
|
@@ -78,6 +84,11 @@ public class TaBuildingProjectTypeController extends BaseController {
|
78
|
84
|
public ResponseBean taBuildingProjectTypeAdd(@RequestBody TaBuildingProjectType taBuildingProjectType){
|
79
|
85
|
ResponseBean responseBean = new ResponseBean();
|
80
|
86
|
try {
|
|
87
|
+ TdBuildingType dict = iTdBuildingTypeService.getById(taBuildingProjectType.getBuildingTypeId());
|
|
88
|
+ if (dict != null) {
|
|
89
|
+ taBuildingProjectType.setBuildingTypeName(dict.getBuildingTypeName());
|
|
90
|
+ }
|
|
91
|
+
|
81
|
92
|
if (iTaBuildingProjectTypeService.save(taBuildingProjectType)){
|
82
|
93
|
responseBean.addSuccess(taBuildingProjectType);
|
83
|
94
|
}else {
|
|
@@ -122,6 +133,11 @@ public class TaBuildingProjectTypeController extends BaseController {
|
122
|
133
|
@RequestBody TaBuildingProjectType taBuildingProjectType){
|
123
|
134
|
ResponseBean responseBean = new ResponseBean();
|
124
|
135
|
try {
|
|
136
|
+ TdBuildingType dict = iTdBuildingTypeService.getById(taBuildingProjectType.getBuildingTypeId());
|
|
137
|
+ if (dict != null) {
|
|
138
|
+ taBuildingProjectType.setBuildingTypeName(dict.getBuildingTypeName());
|
|
139
|
+ }
|
|
140
|
+
|
125
|
141
|
if (iTaBuildingProjectTypeService.updateById(taBuildingProjectType)){
|
126
|
142
|
responseBean.addSuccess(taBuildingProjectType);
|
127
|
143
|
}else {
|