|
@@ -5,6 +5,8 @@ import com.ruoyi.common.core.exception.ServiceException;
|
|
|
import com.ruoyi.common.core.utils.StringUtils;
|
|
|
import com.ruoyi.common.datascope.annotation.DataScope;
|
|
|
import com.ruoyi.common.redis.service.RedisService;
|
|
|
+import com.ruoyi.ext.api.utils.Constants;
|
|
|
+import com.ruoyi.ext.api.utils.OpenDictUtil;
|
|
|
import com.ruoyi.system.api.domain.SysDept;
|
|
|
import com.ruoyi.system.domain.SysDeptJl;
|
|
|
import com.ruoyi.system.mapper.SysDeptJlMapper;
|
|
@@ -145,16 +147,10 @@ public class SysDeptJlServiceImpl implements ISysDeptJlService {
|
|
|
throw new ServiceException("正在同步中,请稍后重试");
|
|
|
}
|
|
|
redisService.setCacheObject("sync_time", 1, 5L, TimeUnit.MINUTES);
|
|
|
- HashMap<String, String> map = new HashMap<>();
|
|
|
- map.put("0", "民政部");
|
|
|
- map.put("1", "民政厅");
|
|
|
- map.put("2", "民政局");
|
|
|
- map.put("3", "民政局");
|
|
|
- map.put("4", "民政办");
|
|
|
- map.put("5", "民政办");
|
|
|
+ HashMap<String, String> map = OpenDictUtil.getDeptLabel();
|
|
|
|
|
|
// 同步一级地区
|
|
|
- SysDeptJl item = sysDeptJlMapper.selectSysDeptJlById("5d4289205ffc6694f7e42082");
|
|
|
+ SysDeptJl item = sysDeptJlMapper.selectSysDeptJlById(Constants.DEPT_ID_JL);
|
|
|
syncD(item, 0L, map);
|
|
|
// 同步二级地区
|
|
|
List<SysDeptJl> sysDeptJls2 = sysDeptJlMapper.selectSysDeptJlByParentId(item.getId());
|