|
|
@ -51,6 +51,7 @@ import org.springblade.core.tool.utils.DateUtil; |
|
|
|
import org.springblade.core.tool.utils.ObjectUtil; |
|
|
|
import org.springblade.core.tool.utils.ObjectUtil; |
|
|
|
import org.springblade.core.tool.utils.StringUtil; |
|
|
|
import org.springblade.core.tool.utils.StringUtil; |
|
|
|
import org.springblade.system.entity.Dept; |
|
|
|
import org.springblade.system.entity.Dept; |
|
|
|
|
|
|
|
import org.springblade.system.feign.ISysClient; |
|
|
|
import org.springblade.system.user.cache.UserCache; |
|
|
|
import org.springblade.system.user.cache.UserCache; |
|
|
|
import org.springblade.system.user.entity.User; |
|
|
|
import org.springblade.system.user.entity.User; |
|
|
|
import org.springframework.beans.factory.annotation.Value; |
|
|
|
import org.springframework.beans.factory.annotation.Value; |
|
|
@ -107,6 +108,8 @@ public class HydropowerServiceImpl implements HydropowerService { |
|
|
|
|
|
|
|
|
|
|
|
private final ISoeClient soeClient; |
|
|
|
private final ISoeClient soeClient; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private final ISysClient sysClient; |
|
|
|
|
|
|
|
|
|
|
|
private final ITicketInfoClient ticketInfoClient; |
|
|
|
private final ITicketInfoClient ticketInfoClient; |
|
|
|
|
|
|
|
|
|
|
|
private final IPlanGenertionClient planGenertionClient; |
|
|
|
private final IPlanGenertionClient planGenertionClient; |
|
|
@ -1610,10 +1613,22 @@ public class HydropowerServiceImpl implements HydropowerService { |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public AppAreaDutyVo areaDuty(Long deptId) { |
|
|
|
public AppAreaDutyVo areaDuty(Long deptId) { |
|
|
|
|
|
|
|
if(ObjectUtil.isEmpty(deptId)){ |
|
|
|
|
|
|
|
R<List<Dept>> result = sysClient.getDeptByCurrentUser(); |
|
|
|
|
|
|
|
if(!result.isSuccess() || CollectionUtil.isEmpty(result.getData())){ |
|
|
|
|
|
|
|
return new AppAreaDutyVo(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
List<Dept> depts = result.getData().stream().filter(o->HomePageConstant.AREA.equals(o.getDeptCategory())).collect(Collectors.toList()); |
|
|
|
|
|
|
|
if(CollectionUtil.isEmpty(depts)){ |
|
|
|
|
|
|
|
return new AppAreaDutyVo(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
deptId = depts.get(0).getId(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 获取当班列表数据
|
|
|
|
// 获取当班列表数据
|
|
|
|
List<DutyMainInfoVo> dutys = this.dutyMainService.getDutyDataV2(deptId); |
|
|
|
List<DutyMainInfoVo> dutys = this.dutyMainService.getDutyDataV2(deptId); |
|
|
|
if(CollectionUtil.isEmpty(dutys)){ |
|
|
|
if(CollectionUtil.isEmpty(dutys)){ |
|
|
|
return null; |
|
|
|
return new AppAreaDutyVo(); |
|
|
|
} |
|
|
|
} |
|
|
|
DutyMainInfoVo duty = dutys.get(0); |
|
|
|
DutyMainInfoVo duty = dutys.get(0); |
|
|
|
// 响应数据
|
|
|
|
// 响应数据
|
|
|
|