|
|
|
@ -21,6 +21,7 @@ import com.hnac.hzims.operational.main.vo.DutyPersonalReportVO;
|
|
|
|
|
import com.hnac.hzims.operational.report.vo.DutyReportVO; |
|
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
|
|
import org.springblade.core.log.exception.ServiceException; |
|
|
|
|
import org.springblade.core.mp.base.BaseServiceImpl; |
|
|
|
|
import org.springblade.core.secure.utils.AuthUtil; |
|
|
|
|
import org.springblade.core.tool.api.R; |
|
|
|
@ -1525,6 +1526,32 @@ public class ImsDutyMainServiceImpl extends BaseServiceImpl<ImsDutyMainMapper, I
|
|
|
|
|
return dutyMainReportExcelList; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public R personScheduling(String date) { |
|
|
|
|
if (ObjectUtil.isEmpty(AuthUtil.getUserId())){ |
|
|
|
|
throw new ServiceException("暂无用户登录信息,请加载后重试"); |
|
|
|
|
} |
|
|
|
|
List<ImsSchedulingVo> imsSchedulingVos = this.baseMapper.selectDutyMainByPerson(date, AuthUtil.getUserId()); |
|
|
|
|
imsSchedulingVos= imsSchedulingVos.stream().map(s->{ |
|
|
|
|
if(StringUtils.isBlank(s.getGroupNames())){ |
|
|
|
|
ImsDutyMainPersonEntity imsDutyMainPersonEntity = imsDutyMainPersonMapper.selectOne(new LambdaQueryWrapper<ImsDutyMainPersonEntity>() {{ |
|
|
|
|
eq(ImsDutyMainPersonEntity::getDutyMainId, s.getId()); |
|
|
|
|
last("limit 1"); |
|
|
|
|
}}); |
|
|
|
|
if (StringUtils.isNotBlank(imsDutyMainPersonEntity.getDutyGroupName())){ |
|
|
|
|
s.setGroupName(imsDutyMainPersonEntity.getDutyGroupName()); |
|
|
|
|
}else { |
|
|
|
|
s.setGroupName("临时班组"); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
return s; |
|
|
|
|
}).collect(Collectors.toList()); |
|
|
|
|
if (CollectionUtil.isNotEmpty(imsSchedulingVos)){ |
|
|
|
|
return R.data(imsSchedulingVos); |
|
|
|
|
} |
|
|
|
|
return R.fail("暂无排班计划"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 获取上一班组 |
|
|
|
|