数据推送列表和明细列表
This commit is contained in:
parent
17ceeef74d
commit
ff3d569e1d
|
|
@ -0,0 +1,123 @@
|
|||
package com.engine.salary.entity.push.dto;
|
||||
|
||||
import com.engine.hrmelog.annotation.ElogTransform;
|
||||
import com.engine.salary.annotation.TableTitle;
|
||||
import com.engine.salary.enums.push.PushRecordStatusEnum;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 数据推送记录列表
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class PushRecordDTO {
|
||||
|
||||
@ElogTransform(name = "")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 批次号
|
||||
*/
|
||||
private Long batchId;
|
||||
|
||||
|
||||
/**
|
||||
* 记录名
|
||||
*/
|
||||
@TableTitle(title = "记录名", dataIndex = "name", key = "name")
|
||||
private String name;
|
||||
|
||||
|
||||
/**
|
||||
* 核算记录id
|
||||
*/
|
||||
private Long acctRecordId;
|
||||
|
||||
|
||||
/**
|
||||
* 推送配置id
|
||||
*/
|
||||
private Long settingId;
|
||||
|
||||
/**
|
||||
* 建模id
|
||||
*/
|
||||
private Integer modeId;
|
||||
|
||||
/**
|
||||
* 数据库表名
|
||||
*/
|
||||
@TableTitle(title = "记录名", dataIndex = "name", key = "name")
|
||||
private String tableName;
|
||||
|
||||
|
||||
/**
|
||||
* 推送状态
|
||||
*
|
||||
* @see PushRecordStatusEnum
|
||||
*/
|
||||
@TableTitle(title = "推送状态", dataIndex = "status", key = "status")
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 执行时间
|
||||
*/
|
||||
@TableTitle(title = "执行时间", dataIndex = "startTime", key = "startTime")
|
||||
private Date startTime;
|
||||
|
||||
/**
|
||||
* 结束时间
|
||||
*/
|
||||
@ElogTransform(name = "结束时间")
|
||||
private Date endTime;
|
||||
|
||||
|
||||
/**
|
||||
* 推送类型,0推送,1撤回
|
||||
*/
|
||||
@ElogTransform(name = "推送类型")
|
||||
private Integer type;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ElogTransform(name = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@ElogTransform(name = "创建人")
|
||||
private Long creator;
|
||||
|
||||
/**
|
||||
* 是否已删除。0:未删除、1:已删除
|
||||
*/
|
||||
@ElogTransform(name = "是否已删除。0:未删除、1:已删除")
|
||||
private Integer deleteType;
|
||||
|
||||
/**
|
||||
* 租户ID
|
||||
*/
|
||||
@ElogTransform(name = "租户ID")
|
||||
private String tenantKey;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@ElogTransform(name = "更新时间")
|
||||
private Date updateTime;
|
||||
|
||||
|
||||
//主键id集合
|
||||
private Collection<Long> ids;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,90 @@
|
|||
package com.engine.salary.entity.push.dto;
|
||||
|
||||
import com.engine.hrmelog.annotation.ElogTransform;
|
||||
import com.engine.salary.annotation.TableTitle;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 数据推送配置
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class PushRecordDetailDTO {
|
||||
|
||||
|
||||
@ElogTransform(name = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 推送记录id
|
||||
*/
|
||||
private Long recordId;
|
||||
|
||||
/**
|
||||
* 核算人员id
|
||||
*/
|
||||
private Long acctEmpId;
|
||||
|
||||
/**
|
||||
* 执行状态
|
||||
* @see com.engine.salary.enums.push.PushRecordDetailStatusEnum
|
||||
*/
|
||||
@TableTitle(title = "执行状态", dataIndex = "status",key = "status")
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 失败原因
|
||||
*/
|
||||
@TableTitle(title = "失败原因", dataIndex = "fail_reason",key = "status")
|
||||
private String fail_reason;
|
||||
|
||||
/**
|
||||
* 执行sql
|
||||
*/
|
||||
@ElogTransform(name = "执行sql")
|
||||
private String execute;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ElogTransform(name = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@ElogTransform(name = "创建人")
|
||||
private Long creator;
|
||||
|
||||
/**
|
||||
* 是否已删除。0:未删除、1:已删除
|
||||
*/
|
||||
@ElogTransform(name = "是否已删除。0:未删除、1:已删除")
|
||||
private Integer deleteType;
|
||||
|
||||
|
||||
/**
|
||||
* 租户ID
|
||||
*/
|
||||
@ElogTransform(name = "租户ID")
|
||||
private String tenantKey;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@ElogTransform(name = "更新时间")
|
||||
private Date updateTime;
|
||||
|
||||
|
||||
//主键id集合
|
||||
private Collection<Long> ids;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
package com.engine.salary.entity.push.param;
|
||||
|
||||
import com.engine.salary.common.BaseQueryParam;
|
||||
import com.engine.salary.util.valid.DataCheck;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class RecordDetailListQueryParam extends BaseQueryParam {
|
||||
|
||||
@DataCheck(require = true, message = "推送记录id不能为空")
|
||||
private Long recordId;
|
||||
|
||||
private String name;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
package com.engine.salary.entity.push.param;
|
||||
|
||||
import com.engine.salary.common.BaseQueryParam;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class RecordListQueryParam extends BaseQueryParam {
|
||||
private String name;
|
||||
|
||||
}
|
||||
|
|
@ -36,6 +36,7 @@ public class PushRecordDetailPO {
|
|||
|
||||
/**
|
||||
* 执行状态
|
||||
* @see com.engine.salary.enums.push.PushRecordDetailStatusEnum
|
||||
*/
|
||||
@ElogTransform(name = "执行状态")
|
||||
private Integer status;
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ import java.util.Date;
|
|||
@AllArgsConstructor
|
||||
public class PushRecordPO {
|
||||
|
||||
@ElogTransform(name = "")
|
||||
@ElogTransform(name = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
|
|
@ -66,6 +66,12 @@ public class PushRecordPO {
|
|||
@ElogTransform(name = "推送状态")
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 失败原因
|
||||
*/
|
||||
@ElogTransform(name = "失败原因")
|
||||
private String fail_reason;
|
||||
|
||||
/**
|
||||
* 开始时间
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -14,9 +14,10 @@ import java.util.Objects;
|
|||
* @version 1.0
|
||||
**/
|
||||
public enum PushRecordDetailStatusEnum implements BaseEnum<Integer> {
|
||||
PREPARE(0, "待执行", 87625),
|
||||
SUCCESS(1, "执行成功", 85393),
|
||||
FAIL(2, "执行失败", 85393);
|
||||
PREPARE(0, "待推送", 87625),
|
||||
SUCCESS(1, "推送成功", 85393),
|
||||
FAIL(2, "推送失败", 85393),
|
||||
WITHDRAW(3, "已撤回", 85393);
|
||||
|
||||
private int value;
|
||||
|
||||
|
|
|
|||
|
|
@ -52,6 +52,6 @@ public enum SalarySQLReferenceEnum implements BaseEnum<String> {
|
|||
return referenceEnum;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
return EMPLOYEE_INFO;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@
|
|||
<include refid="baseColumns"/>
|
||||
FROM hrsa_push_record t
|
||||
WHERE delete_type = 0
|
||||
ORDER BY id DESC
|
||||
</select>
|
||||
|
||||
<!-- 根据主键获取单条记录 -->
|
||||
|
|
|
|||
|
|
@ -1,11 +1,10 @@
|
|||
package com.engine.salary.service;
|
||||
|
||||
import com.engine.salary.entity.push.dto.PushRecordDTO;
|
||||
import com.engine.salary.entity.push.dto.PushRecordDetailDTO;
|
||||
import com.engine.salary.entity.push.dto.PushSettingDTO;
|
||||
import com.engine.salary.entity.push.dto.PushSettingItemDTO;
|
||||
import com.engine.salary.entity.push.param.PushSettingItemQueryParam;
|
||||
import com.engine.salary.entity.push.param.PushSettingItemSaveParam;
|
||||
import com.engine.salary.entity.push.param.PushSettingQueryParam;
|
||||
import com.engine.salary.entity.push.param.PushSettingSaveParam;
|
||||
import com.engine.salary.entity.push.param.*;
|
||||
import com.engine.salary.entity.push.po.PushSettingItemPO;
|
||||
import com.engine.salary.entity.push.po.PushSettingPO;
|
||||
import com.engine.salary.util.page.PageInfo;
|
||||
|
|
@ -68,4 +67,8 @@ public interface PushService {
|
|||
void createPushRecord(Long salaryAcctRecordId);
|
||||
|
||||
void removeBatch(Long batchId);
|
||||
|
||||
PageInfo<PushRecordDTO> recordList(RecordListQueryParam param);
|
||||
|
||||
PageInfo<PushRecordDetailDTO> recordDetailList(RecordDetailListQueryParam param);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,12 +5,11 @@ import com.engine.common.util.ServiceUtil;
|
|||
import com.engine.core.impl.Service;
|
||||
import com.engine.salary.constant.SalaryDefaultTenantConstant;
|
||||
import com.engine.salary.entity.datacollection.DataCollectionEmployee;
|
||||
import com.engine.salary.entity.push.dto.PushRecordDTO;
|
||||
import com.engine.salary.entity.push.dto.PushRecordDetailDTO;
|
||||
import com.engine.salary.entity.push.dto.PushSettingDTO;
|
||||
import com.engine.salary.entity.push.dto.PushSettingItemDTO;
|
||||
import com.engine.salary.entity.push.param.PushSettingItemQueryParam;
|
||||
import com.engine.salary.entity.push.param.PushSettingItemSaveParam;
|
||||
import com.engine.salary.entity.push.param.PushSettingQueryParam;
|
||||
import com.engine.salary.entity.push.param.PushSettingSaveParam;
|
||||
import com.engine.salary.entity.push.param.*;
|
||||
import com.engine.salary.entity.push.po.PushRecordDetailPO;
|
||||
import com.engine.salary.entity.push.po.PushRecordPO;
|
||||
import com.engine.salary.entity.push.po.PushSettingItemPO;
|
||||
|
|
@ -368,6 +367,45 @@ public class PushServiceImpl extends Service implements PushService {
|
|||
if (salaryAcctRecordPO == null) {
|
||||
throw new SalaryRunTimeException("核算记录不存在!");
|
||||
}
|
||||
|
||||
//查询核算人员
|
||||
List<SalaryAcctEmployeePO> salaryAcctEmployeePOS = getSalaryAcctEmployeeService(user).listBySalaryAcctRecordId(salaryAcctRecordPO.getId());
|
||||
|
||||
//薪资项目
|
||||
List<SalaryItemPO> salaryItemPOS = getSalaryItemService(user).listAll();
|
||||
//查询薪资核算记录的薪资周期、考勤周期等
|
||||
SalarySobCycleDTO salarySobCycleDTO = getSalaryAcctRecordService(user).getSalarySobCycleById(salaryAcctRecordPO.getId());
|
||||
|
||||
SalaryAcctCalculateBO salaryAcctCalculateBO = new SalaryAcctCalculateBO()
|
||||
.setSalaryAcctRecordPO(salaryAcctRecordPO)
|
||||
.setSalarySobPO(new SalarySobPO())
|
||||
.setSalarySobCycleDTO(salarySobCycleDTO)
|
||||
.setOtherSalaryAcctRecordPOS(new ArrayList<>())
|
||||
.setSalarySobItemPOS(new ArrayList<>())
|
||||
.setSalaryItemIdWithPriorityList(new ArrayList<>())
|
||||
.setExpressFormulas(new ArrayList<>())
|
||||
.setSalaryItemPOS(salaryItemPOS)
|
||||
.setSalarySobAdjustRulePOS(new ArrayList<>())
|
||||
.setWelfareColumns(new HashMap<>())
|
||||
.setAttendQuoteFieldListDTOS(new ArrayList<>())
|
||||
.setSalaryAcctEmployeePOS(salaryAcctEmployeePOS)
|
||||
.setIssuedFieldIds(new HashSet<>())
|
||||
.setChildMonitor(null)
|
||||
.setResults(null)
|
||||
.setCalculateKey(null)
|
||||
.setVariableItems(new ArrayList<>())
|
||||
.setTaxDeclarationFunction(TaxDeclarationFunctionEnum.OPEN);
|
||||
|
||||
|
||||
List<Long> employeeIds = SalaryEntityUtil.properties(salaryAcctCalculateBO.getSalaryAcctEmployeePOS(), SalaryAcctEmployeePO::getEmployeeId, Collectors.toList());
|
||||
List<DataCollectionEmployee> simpleEmployees = getSalaryEmployeeService(user).getEmployeeByIdsAll(employeeIds);
|
||||
|
||||
List<Long> salaryAcctEmployeeIds = SalaryEntityUtil.properties(salaryAcctCalculateBO.getSalaryAcctEmployeePOS(), SalaryAcctEmployeePO::getId, Collectors.toList());
|
||||
List<SalaryAcctResultPO> salaryAcctResultPOS = getSalaryAcctResultService(user).listBySalaryAcctEmployeeIds(salaryAcctEmployeeIds);
|
||||
|
||||
CalculateFormulaVarBO calculateFormulaVarBO = new CalculateFormulaVarBO(simpleEmployees, new ArrayList<>(), new ArrayList<>(), new ArrayList<>(), new ArrayList<>(), new ArrayList<>(), new ArrayList<>(), salaryAcctResultPOS, new ArrayList<>());
|
||||
Map<String, List<CalculateFormulaVarBO.FormulaVarValue>> formulaVarMap = calculateFormulaVarBO.convert2FormulaVar(salaryAcctCalculateBO);
|
||||
|
||||
List<PushSettingPO> pushSettingPOS = getPushSettingMapper().listSome(PushSettingPO.builder().able(1).build());
|
||||
|
||||
//批次号
|
||||
|
|
@ -399,47 +437,8 @@ public class PushServiceImpl extends Service implements PushService {
|
|||
Long id = setting.getId();
|
||||
List<PushSettingItemPO> pushSettingItemPOS = getPushSettingItemMapper().listSome(PushSettingItemPO.builder().settingId(id).build());
|
||||
|
||||
|
||||
//查询核算人员
|
||||
List<SalaryAcctEmployeePO> salaryAcctEmployeePOS = getSalaryAcctEmployeeService(user).listBySalaryAcctRecordId(salaryAcctRecordPO.getId());
|
||||
|
||||
//薪资项目
|
||||
List<SalaryItemPO> salaryItemPOS = getSalaryItemService(user).listAll();
|
||||
//查询薪资核算记录的薪资周期、考勤周期等
|
||||
SalarySobCycleDTO salarySobCycleDTO = getSalaryAcctRecordService(user).getSalarySobCycleById(salaryAcctRecordPO.getId());
|
||||
|
||||
SalaryAcctCalculateBO salaryAcctCalculateBO = new SalaryAcctCalculateBO()
|
||||
.setSalaryAcctRecordPO(salaryAcctRecordPO)
|
||||
.setSalarySobPO(new SalarySobPO())
|
||||
.setSalarySobCycleDTO(salarySobCycleDTO)
|
||||
.setOtherSalaryAcctRecordPOS(new ArrayList<>())
|
||||
.setSalarySobItemPOS(new ArrayList<>())
|
||||
.setSalaryItemIdWithPriorityList(new ArrayList<>())
|
||||
.setExpressFormulas(new ArrayList<>())
|
||||
.setSalaryItemPOS(salaryItemPOS)
|
||||
.setSalarySobAdjustRulePOS(new ArrayList<>())
|
||||
.setWelfareColumns(new HashMap<>())
|
||||
.setAttendQuoteFieldListDTOS(new ArrayList<>())
|
||||
.setSalaryAcctEmployeePOS(salaryAcctEmployeePOS)
|
||||
.setIssuedFieldIds(new HashSet<>())
|
||||
.setChildMonitor(null)
|
||||
.setResults(null)
|
||||
.setCalculateKey(null)
|
||||
.setVariableItems(new ArrayList<>())
|
||||
.setTaxDeclarationFunction(TaxDeclarationFunctionEnum.OPEN);
|
||||
|
||||
|
||||
List<Long> employeeIds = SalaryEntityUtil.properties(salaryAcctCalculateBO.getSalaryAcctEmployeePOS(), SalaryAcctEmployeePO::getEmployeeId, Collectors.toList());
|
||||
List<DataCollectionEmployee> simpleEmployees = getSalaryEmployeeService(user).getEmployeeByIdsAll(employeeIds);
|
||||
|
||||
List<Long> salaryAcctEmployeeIds = SalaryEntityUtil.properties(salaryAcctCalculateBO.getSalaryAcctEmployeePOS(), SalaryAcctEmployeePO::getId, Collectors.toList());
|
||||
List<SalaryAcctResultPO> salaryAcctResultPOS = getSalaryAcctResultService(user).listBySalaryAcctEmployeeIds(salaryAcctEmployeeIds);
|
||||
|
||||
CalculateFormulaVarBO calculateFormulaVarBO = new CalculateFormulaVarBO(simpleEmployees, new ArrayList<>(), new ArrayList<>(), new ArrayList<>(), new ArrayList<>(), new ArrayList<>(), new ArrayList<>(), salaryAcctResultPOS, new ArrayList<>());
|
||||
Map<String, List<CalculateFormulaVarBO.FormulaVarValue>> formulaVarMap = calculateFormulaVarBO.convert2FormulaVar(salaryAcctCalculateBO);
|
||||
|
||||
//每个人员生成一天明细
|
||||
salaryAcctEmployeePOS.forEach(emp -> {
|
||||
|
||||
//1 获取当前薪资核算人员的公式中的变量的值
|
||||
List<CalculateFormulaVarBO.FormulaVarValue> formulaVarValues = formulaVarMap.get(emp.getEmployeeId() + "_" + emp.getTaxAgentId());
|
||||
//2 人员信息
|
||||
|
|
@ -564,7 +563,7 @@ public class PushServiceImpl extends Service implements PushService {
|
|||
}
|
||||
|
||||
pushRecordDetailPO.setStatus(PushRecordDetailStatusEnum.SUCCESS.getValue());
|
||||
}catch (Exception e){
|
||||
} catch (Exception e) {
|
||||
pushRecordDetailPO.setFail_reason(e.getMessage());
|
||||
pushRecordDetailPO.setStatus(PushRecordDetailStatusEnum.FAIL.getValue());
|
||||
}
|
||||
|
|
@ -591,4 +590,52 @@ public class PushServiceImpl extends Service implements PushService {
|
|||
getPushRecordMapper().delete(pushRecordPO);
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageInfo<PushRecordDTO> recordList(RecordListQueryParam param) {
|
||||
List<PushRecordPO> pushRecordPOS = getPushRecordMapper().listAll();
|
||||
List<PushRecordDTO> listDTOS = SalaryPageUtil.subList(param.getCurrent(), param.getPageSize(), pushRecordPOS)
|
||||
.stream()
|
||||
.map(po -> PushRecordDTO.builder()
|
||||
.id(po.getId())
|
||||
.batchId(po.getBatchId())
|
||||
.name(po.getName())
|
||||
.settingId(po.getId())
|
||||
.modeId(po.getModeId())
|
||||
.tableName(po.getTableName())
|
||||
.acctRecordId(po.getAcctRecordId())
|
||||
.type(PushRecordTypeEnum.PUSH.getValue())
|
||||
.status(PushRecordStatusEnum.PREPARE.getValue())
|
||||
.startTime(po.getStartTime())
|
||||
.endTime(po.getEndTime())
|
||||
.build())
|
||||
.collect(Collectors.toList());
|
||||
|
||||
PageInfo<PushRecordDTO> pageInfo = SalaryPageUtil.buildPage(param.getCurrent(), param.getPageSize(), listDTOS, PushRecordDTO.class);
|
||||
pageInfo.setTotal(pushRecordPOS.size());
|
||||
return pageInfo;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageInfo<PushRecordDetailDTO> recordDetailList(RecordDetailListQueryParam param) {
|
||||
ValidUtil.doValidator(param);
|
||||
|
||||
List<PushRecordDetailPO> pushRecordDetailPOS = getPushRecordDetailMapper().listSome(PushRecordDetailPO.builder().recordId(param.getRecordId()).build());
|
||||
List<PushRecordDetailDTO> listDTOS = SalaryPageUtil.subList(param.getCurrent(), param.getPageSize(), pushRecordDetailPOS)
|
||||
.stream()
|
||||
.map(po -> PushRecordDetailDTO.builder()
|
||||
.id(po.getId())
|
||||
.recordId(po.getRecordId())
|
||||
.acctEmpId(po.getAcctEmpId())
|
||||
.status(po.getStatus())
|
||||
.fail_reason(po.getFail_reason())
|
||||
.execute(po.getExecute())
|
||||
.createTime(po.getCreateTime())
|
||||
.creator(po.getCreator())
|
||||
.build())
|
||||
.collect(Collectors.toList());
|
||||
PageInfo<PushRecordDetailDTO> pageInfo = SalaryPageUtil.buildPage(param.getCurrent(), param.getPageSize(), listDTOS, PushRecordDetailDTO.class);
|
||||
pageInfo.setTotal(pushRecordDetailPOS.size());
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
package com.engine.salary.web;
|
||||
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.salary.entity.push.dto.PushRecordDTO;
|
||||
import com.engine.salary.entity.push.dto.PushRecordDetailDTO;
|
||||
import com.engine.salary.entity.push.dto.PushSettingDTO;
|
||||
import com.engine.salary.entity.push.dto.PushSettingItemDTO;
|
||||
import com.engine.salary.entity.push.param.*;
|
||||
|
|
@ -99,18 +101,18 @@ public class PushController {
|
|||
}
|
||||
|
||||
@POST
|
||||
@Path("/push/list")
|
||||
@Path("/record/list")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String pushList(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody PushParam param) {
|
||||
public String recordList(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody RecordListQueryParam param) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return new ResponseResult<PushParam, String>(user).run(getPushWrapper(user)::push, param);
|
||||
return new ResponseResult<RecordListQueryParam, PageInfo<PushRecordDTO>>(user).run(getPushWrapper(user)::recordList, param);
|
||||
}
|
||||
|
||||
@POST
|
||||
@Path("/push/detail")
|
||||
@Path("/record/detail")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String pushDetail(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody PushParam param) {
|
||||
public String recordDetail(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody RecordDetailListQueryParam param) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return new ResponseResult<PushParam, String>(user).run(getPushWrapper(user)::push, param);
|
||||
return new ResponseResult<RecordDetailListQueryParam, PageInfo<PushRecordDetailDTO>>(user).run(getPushWrapper(user)::recordDetailList, param);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@ package com.engine.salary.wrapper;
|
|||
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.salary.entity.push.dto.PushRecordDTO;
|
||||
import com.engine.salary.entity.push.dto.PushRecordDetailDTO;
|
||||
import com.engine.salary.entity.push.dto.PushSettingDTO;
|
||||
import com.engine.salary.entity.push.dto.PushSettingItemDTO;
|
||||
import com.engine.salary.entity.push.param.*;
|
||||
|
|
@ -63,4 +65,12 @@ public class PushWrapper extends Service {
|
|||
getPushService(user).createPushRecord(pushParam.getSalaryAcctRecordId());
|
||||
}
|
||||
|
||||
public PageInfo<PushRecordDTO> recordList(RecordListQueryParam param) {
|
||||
|
||||
return getPushService(user).recordList(param);
|
||||
}
|
||||
|
||||
public PageInfo<PushRecordDetailDTO> recordDetailList(RecordDetailListQueryParam param) {
|
||||
return getPushService(user).recordDetailList(param);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue