|
|
|
@ -27,6 +27,7 @@ import com.elink.esua.epdc.dto.SysSimpleDeptDTO; |
|
|
|
import com.elink.esua.epdc.entity.SysDeptEntity; |
|
|
|
import com.elink.esua.epdc.service.SysDeptService; |
|
|
|
import com.elink.esua.epdc.service.SysUserService; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
@ -43,6 +44,7 @@ import java.util.Map; |
|
|
|
* @author Mark sunlightcs@gmail.com |
|
|
|
* @since 1.0.0 |
|
|
|
*/ |
|
|
|
@Slf4j |
|
|
|
@Service |
|
|
|
public class SysDeptServiceImpl extends BaseServiceImpl<SysDeptDao, SysDeptEntity> implements SysDeptService { |
|
|
|
@Autowired |
|
|
|
@ -67,7 +69,7 @@ public class SysDeptServiceImpl extends BaseServiceImpl<SysDeptDao, SysDeptEntit |
|
|
|
public List<SysSimpleDeptDTO> subList(String pid) { |
|
|
|
QueryWrapper<SysDeptEntity> wrapper = new QueryWrapper<>(); |
|
|
|
wrapper.eq("PID", pid) |
|
|
|
.ne("TYPE_KEY","district_dept") |
|
|
|
.ne("TYPE_KEY", "district_dept") |
|
|
|
.select(FieldConstant.ID, FieldConstant.NAME) |
|
|
|
.orderByAsc(FieldConstant.NAME); |
|
|
|
List<SysDeptEntity> entities = this.baseDao.selectList(wrapper); |
|
|
|
@ -185,8 +187,17 @@ public class SysDeptServiceImpl extends BaseServiceImpl<SysDeptDao, SysDeptEntit |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public Result<CompleteDeptDTO> getCompleteDept(Long gridId) { |
|
|
|
CompleteDeptDTO completeDept = this.baseDao.getCompleteDept(gridId); |
|
|
|
public Result<CompleteDeptDTO> getCompleteDept(String gridId) { |
|
|
|
Long gridIdL = null; |
|
|
|
try { |
|
|
|
gridIdL = Long.parseLong(gridId.trim()); |
|
|
|
} catch (Exception e) { |
|
|
|
log.error("->getCompleteDept:::网格ID格式转换异常:::grid->{}", gridId); |
|
|
|
} |
|
|
|
if (null == gridId) { |
|
|
|
return new Result().error("参数格式异常"); |
|
|
|
} |
|
|
|
CompleteDeptDTO completeDept = this.baseDao.getCompleteDept(gridIdL); |
|
|
|
return new Result().ok(completeDept); |
|
|
|
} |
|
|
|
|
|
|
|
|