|
@@ -29,19 +29,21 @@ public class PlaceTask extends BaseTask {
|
29
|
29
|
@Override
|
30
|
30
|
@Transactional(rollbackFor = Exception.class)
|
31
|
31
|
public void start() {
|
32
|
|
- log.info(" *** 楼层PlaceTask转换开始 *** ");
|
33
|
|
- StringBuffer sql = new StringBuffer("select 0 as version,area_id as build_id,SUBSTRING_INDEX(SUBSTRING_INDEX(place,'楼',1),'号',1) as floor_name,IF(branch_id=4,3,branch_id) as hos_id,now() as operator_time, ");
|
34
|
|
- sql.append(" delete_flag as _delete from itsm_uc_place");
|
35
|
|
- List<Map<String, Object>> placeList = jdbcTemplateMdv2.queryForList(sql.toString());
|
36
|
|
- FieldMapper mapper = new FieldMapper();
|
37
|
|
- mapper.addOperationReplace("build_id", areaTask.loadCache().getIdCache());
|
38
|
|
- mapper.trans2JdbcRow(placeList);
|
|
32
|
+ if ("xiangyang".equals(appName)) {
|
|
33
|
+ log.info(" *** 楼层PlaceTask转换开始 *** ");
|
|
34
|
+ StringBuffer sql = new StringBuffer("select 0 as version,area_id as build_id,SUBSTRING_INDEX(SUBSTRING_INDEX(place,'楼',1),'号',1) as floor_name,IF(branch_id=4,3,branch_id) as hos_id,now() as operator_time, ");
|
|
35
|
+ sql.append(" delete_flag as _delete from itsm_uc_place");
|
|
36
|
+ List<Map<String, Object>> placeList = jdbcTemplateMdv2.queryForList(sql.toString());
|
|
37
|
+ FieldMapper mapper = new FieldMapper();
|
|
38
|
+ mapper.addOperationReplace("build_id", areaTask.loadCache().getIdCache());
|
|
39
|
+ mapper.trans2JdbcRow(placeList);
|
39
|
40
|
|
40
|
|
- FieldMapper areaMapper = this.loadCache();
|
41
|
|
- RowsWrap rw = DataMigrationter.getRowsWrap(mapper,areaMapper);
|
42
|
|
- JdbcUtil jdbcUtil = new JdbcUtil(jdbcTemplateHsms);
|
43
|
|
- //科室只做更新 已有的科室不做处理
|
44
|
|
- jdbcUtil.batchPageInsert("itsm_uc_floor", rw.getInsertRows());
|
|
41
|
+ FieldMapper areaMapper = this.loadCache();
|
|
42
|
+ RowsWrap rw = DataMigrationter.getRowsWrap(mapper,areaMapper);
|
|
43
|
+ JdbcUtil jdbcUtil = new JdbcUtil(jdbcTemplateHsms);
|
|
44
|
+ //科室只做更新 已有的科室不做处理
|
|
45
|
+ jdbcUtil.batchPageInsert("itsm_uc_floor", rw.getInsertRows());
|
|
46
|
+ }
|
45
|
47
|
}
|
46
|
48
|
|
47
|
49
|
@Override
|