|
@@ -49,13 +49,13 @@ public class PlaceTask extends BaseTask {
|
49
|
49
|
log.info(" *** 加载楼层place缓存 *** ");
|
50
|
50
|
StringBuffer sql = new StringBuffer("select id,hos_id,build_id,floor_name from itsm_uc_floor ");
|
51
|
51
|
List<Map<String, Object>> floorList = jdbcTemplateHsms.queryForList(sql.toString());
|
52
|
|
- sql = new StringBuffer("select id,IF(branch_id=4,3,branch_id) as branch_id,area_id,SUBSTRING_INDEX(SUBSTRING_INDEX(place,'楼',1),'号',1) as place from itsm_uc_place ");
|
|
52
|
+ sql = new StringBuffer("select id,IF(branch_id=4,3,branch_id) as hos_id,area_id as build_id,SUBSTRING_INDEX(SUBSTRING_INDEX(place,'楼',1),'号',1) as floor_name from itsm_uc_place ");
|
53
|
53
|
List<Map<String, Object>> placeList = jdbcTemplateMdv2.queryForList(sql.toString());
|
54
|
54
|
|
55
|
55
|
FieldMapper mapper = new FieldMapper();
|
56
|
|
- mapper.addFieldMapper("floor_name", "place");
|
57
|
|
- mapper.addFieldMapper("build_id", "area_id");
|
58
|
|
- mapper.addFieldMapper("hos_id", "branch_id");
|
|
56
|
+ mapper.addFieldMapper("floor_name", "floor_name");
|
|
57
|
+ mapper.addFieldMapper("build_id", "build_id");
|
|
58
|
+ mapper.addFieldMapper("hos_id", "hos_id");
|
59
|
59
|
|
60
|
60
|
DataMigrationter.loadCache(floorList, placeList, mapper);
|
61
|
61
|
|