|
@ -52,6 +52,7 @@ public class EIDimServiceImpl implements EIDimService { |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 查询可更新的单位 |
|
|
* 查询可更新的单位 |
|
|
|
|
|
* |
|
|
* @return |
|
|
* @return |
|
|
*/ |
|
|
*/ |
|
|
private List<CustomerAgencyEntity> listAgencies2Update() { |
|
|
private List<CustomerAgencyEntity> listAgencies2Update() { |
|
@ -69,6 +70,7 @@ public class EIDimServiceImpl implements EIDimService { |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 查询可增加的单位 |
|
|
* 查询可增加的单位 |
|
|
|
|
|
* |
|
|
* @return |
|
|
* @return |
|
|
*/ |
|
|
*/ |
|
|
private List<CustomerAgencyEntity> listAgencies2Add() { |
|
|
private List<CustomerAgencyEntity> listAgencies2Add() { |
|
@ -92,6 +94,7 @@ public class EIDimServiceImpl implements EIDimService { |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 查询需要更新的部门列表 |
|
|
* 查询需要更新的部门列表 |
|
|
|
|
|
* |
|
|
* @return |
|
|
* @return |
|
|
*/ |
|
|
*/ |
|
|
private List<CustomerDepartmentEntity> listDepts2Update() { |
|
|
private List<CustomerDepartmentEntity> listDepts2Update() { |
|
@ -109,6 +112,7 @@ public class EIDimServiceImpl implements EIDimService { |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 查询需要新增的部门列表 |
|
|
* 查询需要新增的部门列表 |
|
|
|
|
|
* |
|
|
* @return |
|
|
* @return |
|
|
*/ |
|
|
*/ |
|
|
private List<CustomerDepartmentEntity> listDepts2Add() { |
|
|
private List<CustomerDepartmentEntity> listDepts2Add() { |
|
@ -126,36 +130,28 @@ public class EIDimServiceImpl implements EIDimService { |
|
|
@Override |
|
|
@Override |
|
|
public void initGrids() { |
|
|
public void initGrids() { |
|
|
List<CustomerGridEntity> grids2Add = listGrids2Add(); |
|
|
List<CustomerGridEntity> grids2Add = listGrids2Add(); |
|
|
List<CustomerGridEntity> grids2Update =listGrids2Update(); |
|
|
List<CustomerGridEntity> grids2Update = listGrids2Update(); |
|
|
screenCustomerGridService.addAndUpdateGrids(grids2Add, grids2Update); |
|
|
screenCustomerGridService.addAndUpdateGrids(grids2Add, grids2Update); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
public Map<String,Integer> updateCenterPointByName(GridCenterPointForm param) { |
|
|
public Map<String, Integer> updateCenterPointByName(GridCenterPointForm param) { |
|
|
//todo 怎么反向判断 左匹配
|
|
|
|
|
|
List<ScreenProjectGridDailyDTO> gridInfos = screenCustomerGridService.selectGridInfoByCustomerId(param.getCustomerId()); |
|
|
List<ScreenProjectGridDailyDTO> gridInfos = screenCustomerGridService.selectGridInfoByCustomerId(param.getCustomerId()); |
|
|
Map<String,Integer> result = new HashMap<>(); |
|
|
Map<String, Integer> result = new HashMap<>(); |
|
|
|
|
|
|
|
|
|
|
|
gridInfos.forEach(grid -> { |
|
|
gridInfos.forEach(grid->{ |
|
|
|
|
|
//客户id 和组织id 都相等 且 名字 包含关系时才修改
|
|
|
//客户id 和组织id 都相等 且 名字 包含关系时才修改
|
|
|
if (grid.getCustomerId().equals(param.getCustomerId())){ |
|
|
if (grid.getCustomerId().equals(param.getCustomerId())) { |
|
|
AtomicInteger integer = new AtomicInteger(0); |
|
|
AtomicInteger integer = new AtomicInteger(0); |
|
|
param.getCenterDataList().forEach(o ->{ |
|
|
param.getCenterDataList().forEach(o -> { |
|
|
if (grid.getGridName().contains(o.getTitle())) { |
|
|
if (grid.getGridName().contains(o.getTitle())) { |
|
|
Integer effectRow = screenCustomerGridService.updateCenterPointByName(param.getCustomerId(), o.getTitle(), o.getCenter()); |
|
|
Integer effectRow = screenCustomerGridService.updateCenterPointByName(param.getCustomerId(), o.getTitle(), o.getCenter()); |
|
|
integer.addAndGet(effectRow); |
|
|
integer.addAndGet(effectRow); |
|
|
} |
|
|
} |
|
|
result.put(grid.getGridId(),integer.intValue()); |
|
|
result.put(grid.getGridId(), integer.intValue()); |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
/*param.getCenterDataList().forEach(o ->{ |
|
|
|
|
|
Integer integer = screenCustomerGridService.updateCenterPointByName(param.getCustomerId(),param.getAgencyId(), o.getTitle(), o.getCenter()); |
|
|
|
|
|
if (integer == 0 || integer > 1){ |
|
|
|
|
|
result.put(o.getTitle(),integer); |
|
|
|
|
|
} |
|
|
|
|
|
});*/ |
|
|
|
|
|
return result; |
|
|
return result; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|