|
|
@@ -68,17 +68,18 @@ public class TaskStatisticsServiceImpl implements TaskStatisticsService {
|
|
|
if (StringUtils.isNotEmpty(deptId)) {
|
|
|
int length = deptId.length();
|
|
|
if (length > 0) {
|
|
|
- if (length > 10) {
|
|
|
- String substring = deptId.substring(0, 6);
|
|
|
- String substring1 = deptId.substring(0, 8);
|
|
|
- SysDept cityName = sysDeptService.getById(substring);
|
|
|
- SysDept districtName = sysDeptService.getById(substring1);
|
|
|
- record.setCityName(cityName.getName());
|
|
|
- record.setDistrictName(districtName.getName());
|
|
|
- } else if (length > 6) {
|
|
|
- String substring = deptId.substring(0, 6);
|
|
|
- SysDept cityName = sysDeptService.getById(substring);
|
|
|
- record.setCityName(cityName.getName());
|
|
|
+ if (length > 0) {
|
|
|
+ if (length > 10) {
|
|
|
+ String substring = deptId.substring(0, 6);
|
|
|
+ String substring1 = deptId.substring(0, 8);
|
|
|
+ String province = deptId.substring(0, 4);
|
|
|
+ SysDept cityName = sysDeptService.getById(substring);
|
|
|
+ SysDept districtName = sysDeptService.getById(substring1);
|
|
|
+ SysDept provinceName = sysDeptService.getById(province);
|
|
|
+ record.setCityName(cityName.getName());
|
|
|
+ record.setDistrictName(districtName.getName());
|
|
|
+ record.setProvinceName(provinceName.getName());
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|