数据推送
This commit is contained in:
parent
fd48cd9a3d
commit
e4e3fb4bec
|
|
@ -2,6 +2,7 @@ package com.engine.salary.entity.push.dto;
|
|||
|
||||
import com.engine.hrmelog.annotation.ElogTransform;
|
||||
import com.engine.salary.annotation.TableTitle;
|
||||
import com.engine.salary.entity.salarysob.po.SalarySobPO;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
|
|
@ -36,9 +37,8 @@ public class PushSettingDTO {
|
|||
/**
|
||||
* 薪资帐套集合
|
||||
*/
|
||||
@TableTitle(title = "薪资帐套集合", key = "salarySobNames", dataIndex = "salarySobNames")
|
||||
private List<String> salarySobNames;
|
||||
private List<Long> salarySobIds;
|
||||
@TableTitle(title = "薪资帐套集合", key = "salarySobs", dataIndex = "salarySobs")
|
||||
private List<SalarySobPO> salarySobs;
|
||||
|
||||
/**
|
||||
* 建模id
|
||||
|
|
|
|||
|
|
@ -72,6 +72,10 @@ public class PushServiceImpl extends Service implements PushService {
|
|||
return ServiceUtil.getService(SalaryAcctRecordServiceImpl.class, user);
|
||||
}
|
||||
|
||||
private SalarySobService getSalarySobService(User user) {
|
||||
return ServiceUtil.getService(SalarySobServiceImpl.class, user);
|
||||
}
|
||||
|
||||
private SalaryAcctEmployeeService getSalaryAcctEmployeeService(User user) {
|
||||
return ServiceUtil.getService(SalaryAcctEmployeeServiceImpl.class, user);
|
||||
}
|
||||
|
|
@ -84,16 +88,19 @@ public class PushServiceImpl extends Service implements PushService {
|
|||
public PageInfo<PushSettingDTO> settingList(PushSettingQueryParam param) {
|
||||
List<PushSettingPO> pushSettingPOS = getPushSettingMapper().listAll();
|
||||
|
||||
List<SalarySobPO> salarySobPOS = getSalarySobService(user).listAll();
|
||||
Map<Long, SalarySobPO> sobPOMap = SalaryEntityUtil.convert2Map(salarySobPOS, SalarySobPO::getId);
|
||||
|
||||
List<PushSettingDTO> list = pushSettingPOS.stream()
|
||||
.filter(po -> StrUtil.isNotBlank(param.getName()) && po.getName().contains(param.getName())).map(
|
||||
.filter(po -> StrUtil.isBlank(param.getName()) || po.getName().contains(param.getName())).map(
|
||||
po -> PushSettingDTO.builder()
|
||||
.id(po.getId())
|
||||
.name(po.getName())
|
||||
.tableName(po.getTableName())
|
||||
.modeName(po.getModeName())
|
||||
.modeId(po.getModeId())
|
||||
.able(po.getAble())
|
||||
.salarySobIds(po.getSalarySobIds())
|
||||
// .salarySobNames(po.getSalarySobNames())
|
||||
.salarySobs(po.getSalarySobIds().stream().map(sobPOMap::get).collect(Collectors.toList()))
|
||||
.build()).collect(Collectors.toList());
|
||||
return SalaryPageUtil.buildPage(param.getCurrent(), param.getPageSize(), list, PushSettingDTO.class);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue