提交 | 用户 | age
|
a6a76f
|
1 |
package com.yc.app.v2.service.impl; |
F |
2 |
|
|
3 |
import com.yc.app.v2.entity.FormVOEntity; |
|
4 |
import com.yc.app.v2.entity.MetaDataEntity; |
|
5 |
import com.yc.app.v2.service.T_5_Service; |
|
6 |
import com.yc.app.v2.utils.Page; |
|
7 |
import org.springframework.stereotype.Service; |
|
8 |
|
|
9 |
import java.util.HashMap; |
|
10 |
import java.util.List; |
|
11 |
import java.util.Map; |
|
12 |
|
|
13 |
/** |
|
14 |
* 5类型加载内容,主从表 |
|
15 |
*/ |
|
16 |
@Service |
|
17 |
public class T_5_ServiceImpl extends DanJunFormServiceImpl implements T_5_Service { |
|
18 |
|
|
19 |
|
|
20 |
|
|
21 |
|
|
22 |
@Override |
|
23 |
public Page getData(FormVOEntity formVOEntity, Map<String, String> env, MetaDataEntity metaDataEntity) { |
|
24 |
//----取主表数据 |
|
25 |
Page master= super.getData(formVOEntity, env, metaDataEntity); |
|
26 |
Map<String,Object> map=new HashMap<>(); |
|
27 |
Map otherInfo=new HashMap(); |
|
28 |
Map otherMap=new HashMap(); |
|
29 |
Map otherMap2=new HashMap(); |
|
30 |
otherMap.put("isView",formVOEntity.getIsView()); |
|
31 |
otherMap.put("primaryKey",formVOEntity.getPrimaryKey()); |
|
32 |
otherMap.put("tableName",formVOEntity.getTableName()); |
|
33 |
otherInfo.put("master",otherMap); |
|
34 |
//-----取从表数据 |
|
35 |
metaDataEntity.getGformEntity().setGetHeadTabe(false); |
|
36 |
//---把主表的数据放到env,因为参数替换有可能是取主表数据 |
b9e8fc
|
37 |
if(master.getData()!=null) { |
F |
38 |
env.putAll((Map<String, String>) ((List) master.getData()).get(0)); |
|
39 |
} |
a6a76f
|
40 |
Page slave= super.getData(formVOEntity, env, metaDataEntity); |
F |
41 |
otherMap2.put("isView",formVOEntity.getIsView()); |
|
42 |
otherMap2.put("primaryKey",formVOEntity.getPrimaryKey()); |
|
43 |
otherMap2.put("tableName",formVOEntity.getTableName()); |
|
44 |
otherInfo.put("slave",otherMap2); |
|
45 |
master.setOtherInfo(otherInfo); |
|
46 |
map.put("master",master.getData()); |
|
47 |
map.put("slave",slave.getData()); |
|
48 |
master.setData(map); |
|
49 |
return master; |
|
50 |
} |
|
51 |
|
|
52 |
} |