!14 福利台账列表

Merge pull request !14 from reset/archive
This commit is contained in:
reset 2022-04-11 11:09:01 +00:00 committed by Gitee
commit 58e18a353c
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
22 changed files with 1449 additions and 1 deletions

View File

@ -0,0 +1,13 @@
package com.api.salary.web;
import javax.ws.rs.Path;
/**
* @Author weaver_cl
* @Description: TODO
* @Date 2022/4/11
* @Version V1.0
**/
@Path("/bs/hrmsalary/siaccount")
public class SIAccountController extends com.engine.salary.web.SIAccountController {
}

View File

@ -0,0 +1,35 @@
package com.engine.salary.biz;
import com.engine.salary.entity.siaccount.param.InsuranceAccountBatchParam;
import com.engine.salary.entity.siaccount.po.InsuranceAccountBatchPO;
import com.engine.salary.mapper.siaccount.InsuranceAccountBatchMapper;
import com.engine.salary.util.page.PageInfo;
import com.engine.salary.util.page.PageUtil;
import org.apache.ibatis.session.SqlSession;
import weaver.conn.mybatis.MyBatisFactory;
import java.util.List;
/**
* @Author weaver_cl
* @Description: TODO
* @Date 2022/4/11
* @Version V1.0
**/
public class SIAccountBiz {
public PageInfo<InsuranceAccountBatchPO> listPage(InsuranceAccountBatchParam queryParam, Long employeeId) {
SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession();
try {
InsuranceAccountBatchMapper insuranceAccountBatchMapper = sqlSession.getMapper(InsuranceAccountBatchMapper.class);
PageUtil.start(queryParam.getCurrent(), queryParam.getPageSize());
List<InsuranceAccountBatchPO> list = insuranceAccountBatchMapper.list(queryParam);
PageInfo<InsuranceAccountBatchPO> pageInfo = new PageInfo<>(list,InsuranceAccountBatchPO.class);
return pageInfo;
}finally {
sqlSession.close();
}
}
}

View File

@ -0,0 +1,95 @@
package com.engine.salary.entity.siaccount.bo;
import com.engine.salary.entity.siaccount.dto.InsuranceAccountBatchListDTO;
import com.engine.salary.entity.siaccount.po.InsuranceAccountBatchPO;
import com.engine.salary.enums.siaccount.BillStatusEnum;
import com.engine.salary.util.SalaryEntityUtil;
import com.engine.salary.util.SalaryEnumUtil;
import org.apache.commons.collections.CollectionUtils;
import java.text.SimpleDateFormat;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.stream.Collectors;
/**
* @Author weaver_cl
* @Description:
* @Date 2022/4/11
* @Version V1.0
**/
public class InsuranceAccountBO {
// public static Wrapper<InsuranceAccountInspectPO> buildInspectListWrapper(String billMonth, String tenantKey) {
// LambdaQueryWrapper<InsuranceAccountInspectPO> lambdaQueryWrapper = Wrappers.lambdaQuery();
// lambdaQueryWrapper.eq(InsuranceAccountInspectPO::getTenantKey, tenantKey);
// lambdaQueryWrapper.eq(InsuranceAccountInspectPO::getDeleteType, DeleteTypeEnum.NOT_DELETED.getValue());
// lambdaQueryWrapper.eq(InsuranceAccountInspectPO::getBillMonth, billMonth);
// return lambdaQueryWrapper;
// }
//
// public static Wrapper<InsuranceAccountBatchPO> buildBatchListWrapper(String startTime, String endTime, String tenantKey) {
// LambdaQueryWrapper<InsuranceAccountBatchPO> lambdaQueryWrapper = Wrappers.lambdaQuery();
// lambdaQueryWrapper.eq(InsuranceAccountBatchPO::getTenantKey, tenantKey);
// lambdaQueryWrapper.eq(InsuranceAccountBatchPO::getDeleteType, DeleteTypeEnum.NOT_DELETED.getValue());
// if (StringUtils.isNotBlank(startTime)) {
// lambdaQueryWrapper.ge(InsuranceAccountBatchPO::getBillMonth, startTime);
// }
// if (StringUtils.isNotBlank(endTime)) {
// lambdaQueryWrapper.le(InsuranceAccountBatchPO::getBillMonth, endTime);
// }
// lambdaQueryWrapper.orderByDesc(InsuranceAccountBatchPO::getBillMonth);
// return lambdaQueryWrapper;
// }
//
public static List<InsuranceAccountBatchListDTO> buildAccountBatchDTOList(Collection<InsuranceAccountBatchPO> list) {
if (CollectionUtils.isEmpty(list)) {
return Collections.emptyList();
}
return list.stream().map(e -> InsuranceAccountBatchListDTO.builder()
.id(e.getId())
.accountant(e.getAccountant())
.billMonth(e.getBillMonth())
.billStatus(queryLabelId(e.getBillStatus()).getDefaultLabel())
.fundNum(e.getFundNum())
.fundPay(SalaryEntityUtil.thousandthConvert(e.getFundPay()))
.lastTime(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(e.getUpdateTime()))
.otherNum(e.getOtherNum())
.otherPay(SalaryEntityUtil.thousandthConvert(e.getOtherPay()))
.remarks(e.getRemarks())
.socialNum(e.getSocialNum())
.socialPay(SalaryEntityUtil.thousandthConvert(e.getSocialPay()))
.build()
).collect(Collectors.toList());
}
public static BillStatusEnum queryLabelId(Integer value) {
return SalaryEnumUtil.enumMatchByValue(value, BillStatusEnum.values(), BillStatusEnum.class);
}
//
// public static Wrapper<InsuranceAccountDetailPO> buildBillWrapper(String billMonth, PaymentStatusEnum paymentStatusEnum, Long employeeId, String tenantKey) {
// LambdaQueryWrapper<InsuranceAccountDetailPO> queryWrapper = Wrappers.lambdaQuery();
// queryWrapper.eq(InsuranceAccountDetailPO::getTenantKey, tenantKey);
// queryWrapper.eq(InsuranceAccountDetailPO::getDeleteType, DeleteTypeEnum.NOT_DELETED.getValue());
// queryWrapper.eq(InsuranceAccountDetailPO::getBillMonth, billMonth);
// queryWrapper.eq(InsuranceAccountDetailPO::getPaymentStatus, paymentStatusEnum.getValue());
// queryWrapper.orderByDesc(InsuranceAccountDetailPO::getUpdateTime);
// return queryWrapper;
// }
//
// public static Wrapper<InsuranceAccountDetailPO> buildPersonBillWrapper(String startMonth, String endMonth, Long employeeId, String tenantKey) {
// LambdaQueryWrapper<InsuranceAccountDetailPO> queryWrapper = Wrappers.lambdaQuery();
// queryWrapper.eq(InsuranceAccountDetailPO::getTenantKey, tenantKey);
// queryWrapper.eq(InsuranceAccountDetailPO::getDeleteType, DeleteTypeEnum.NOT_DELETED.getValue());
// queryWrapper.eq(InsuranceAccountDetailPO::getEmployeeId, employeeId);
// if (StringUtils.isNotBlank(startMonth) && StringUtils.isNotBlank(endMonth)) {
// queryWrapper.between(InsuranceAccountDetailPO::getBillMonth, startMonth, endMonth);
// }
// queryWrapper.orderByDesc(InsuranceAccountDetailPO::getBillMonth);
// return queryWrapper;
// }
}

View File

@ -0,0 +1,105 @@
package com.engine.salary.entity.siaccount.dto;
import com.cloudstore.eccom.pc.table.WeaTableType;
import com.engine.salary.annotation.SalaryTable;
import com.engine.salary.annotation.SalaryTableColumn;
import com.engine.salary.annotation.SalaryTableOperate;
import com.engine.salary.annotation.TableTitle;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @Author weaver_cl
* @Description: 福利台账列表
* @Date 2022/4/11
* @Version V1.0
**/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@SalaryTable(pageId = "1f9fdc73-9cc2-4206-9b2c-6c6ac98d8500", tableType = WeaTableType.NONE,operates = {
@SalaryTableOperate(index = "0", text = "核算"),
@SalaryTableOperate(index = "1", text = "归档"),
@SalaryTableOperate(index = "2", text = "异常详情"),
@SalaryTableOperate(index = "3", text = "删除"),
@SalaryTableOperate(index = "4", text = "查看")
})
public class InsuranceAccountBatchListDTO {
/**
* 主键id
*/
@TableTitle(title = "id", dataIndex = "id", key = "id")
private Long id;
/**
* 账单月份
*/
@TableTitle(title = "账单月份", dataIndex = "billMonth", key = "billMonth")
private String billMonth;
/**
* 账单状态 0-未归档 1-已归档
*/
@TableTitle(title = "账单状态", dataIndex = "billStatus", key = "billStatus")
private String billStatus;
/**
* 社保核算人数
*/
@TableTitle(title = "社保核算人数", dataIndex = "socialNum", key = "socialNum")
private Integer socialNum;
/**
* 公积金核算人数
*/
@TableTitle(title = "公积金核算人数", dataIndex = "fundNum", key = "fundNum")
private Integer fundNum;
/**
* 其他福利核算人数
*/
@TableTitle(title = "其他福利核算人数", dataIndex = "otherNum", key = "otherNum")
private Integer otherNum;
/**
* 社保缴费总额(单位+个人)
*/
@TableTitle(title = "社保缴费总额(单位+个人)", dataIndex = "socialPay", key = "socialPay")
private String socialPay;
/**
* 公积金缴费总额(单位+个人)
*/
@TableTitle(title = "公积金缴费总额(单位+个人)", dataIndex = "fundPay", key = "fundPay")
private String fundPay;
/**
* 其他福利缴费总额(单位+个人)
*/
@TableTitle(title = "其他福利缴费总额(单位+个人)", dataIndex = "otherPay", key = "otherPay")
private String otherPay;
/**
* 核算人
*/
@TableTitle(title = "核算人", dataIndex = "accountant", key = "accountant")
private String accountant;
/**
* 最后操作时间
*/
@TableTitle(title = "最后操作时间", dataIndex = "lastTime", key = "lastTime")
private String lastTime;
/**
* 备注
*/
@TableTitle(title = "备注", dataIndex = "remarks", key = "remarks")
private String remarks;
}

View File

@ -0,0 +1,44 @@
package com.engine.salary.entity.siaccount.dto;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.List;
import java.util.Map;
/**
* @Author weaver_cl
* @Description: TODO 台账页tab
* @Date 2022/4/11
* @Version V1.0
**/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class InsuranceAccountTabDTO {
/**
* tab列表
*/
private List<Map<String, Object>> tabList;
/**
* 核算-true
* 查看-false
*/
private boolean isShow;
/**
* 备注
*/
private String remarks;
/**
* 账单月份
*/
private String billMonth;
}

View File

@ -0,0 +1,47 @@
package com.engine.salary.entity.siaccount.dto;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @Author weaver_cl
* @Description: TODO 台账总览列表
* @Date 2022/4/11
* @Version V1.0
**/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class InsuranceAccountViewListDTO {
//"序号")
private Long index;
//缴纳组织")
private String payOrg;
//社保人数")
private Integer socialNum;
//公积金人数")
private Integer fundNum;
//其他福利人数")
private Integer otherNum;
//社保缴费合计")
private String socialPaySum;
//公积金缴费合计")
private String fundPaySum;
//其他福利缴费合计")
private String otherPaySum;
//合计")
private String sum;
}

View File

@ -0,0 +1,32 @@
package com.engine.salary.entity.siaccount.param;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.List;
/**
* @Author weaver_cl
* @Description: TODO 保存并进入核算
* @Date 2022/4/11
* @Version V1.0
**/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class AccountParam {
//账单月份")
//@NotNull
private String billMonth;
//备注")
//@Length(max = 60)
private String remarks;
//核算人员id集合")
private List<Long> ids;
}

View File

@ -0,0 +1,29 @@
package com.engine.salary.entity.siaccount.param;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.List;
/**
* @Author weaver_cl
* @Description: TODO 核算异常重新核算
* @Date 2022/4/11
* @Version V1.0
**/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class InspectAccountParam {
//核算异常主键id")
//@NotNull
private List<Long> ids;
//账单月份")
private String billMonth;
}

View File

@ -0,0 +1,24 @@
package com.engine.salary.entity.siaccount.param;
import com.engine.salary.common.BaseQueryParam;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @Author weaver_cl
* @Description: TODO
* @Date 2022/4/11
* @Version V1.0
**/
@Data
@NoArgsConstructor
@AllArgsConstructor
public class InsuranceAccountBatchParam extends BaseQueryParam {
//开始时间
private String startTime;
//结束时间
private String endTime;
}

View File

@ -0,0 +1,30 @@
package com.engine.salary.entity.siaccount.param;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.List;
/**
* @Author weaver_cl
* @Description: TODO 添加正常缴纳
* @Date 2022/4/11
* @Version V1.0
**/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class SaveCommonAccountParam {
//包含人员")
private List<Long> includes;
//剔除人员")
private List<Long> excludes;
//账单月份")
private String billMonth;
}

View File

@ -0,0 +1,41 @@
package com.engine.salary.entity.siaccount.param;
import com.alibaba.fastjson.annotation.JSONField;
import com.alibaba.fastjson.serializer.ToStringSerializer;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.List;
/**
* @Author weaver_cl
* @Description: TODO 添加补缴核算人员
* @Date 2022/4/11
* @Version V1.0
**/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class SaveSupplementaryAccountParam {
//补缴月份")
private List<String> billMonthList;
//补缴项目")
@JSONField(serializeUsing = ToStringSerializer.class)
private List<Integer> projects;
//包含人员")
@JSONField(serializeUsing = ToStringSerializer.class)
private List<Long> includes;
//排除人员")
@JSONField(serializeUsing = ToStringSerializer.class)
private List<Long> excludes;
//账单月份")
private String billMonth;
}

View File

@ -0,0 +1,33 @@
package com.engine.salary.entity.siaccount.param;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.List;
/**
* @Author weaver_cl
* @Description: TODO 组装补缴基本数据
* @Date 2022/4/11
* @Version V1.0
**/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class SupplementAccountBaseParam {
//员工id")
private Long employeeId;
//账单月份")
private String billMonth;
//补缴月份")
private String supplementaryMonth;
//补缴项目")
private List<Integer> projects;
}

View File

@ -0,0 +1,103 @@
package com.engine.salary.entity.siaccount.po;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.Date;
/**
* @Author weaver_cl
* @Description: TODO 核算主表 hrsa_bill_batch
* @Date 2022/4/11
* @Version V1.0
**/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class InsuranceAccountBatchPO {
/**
* 主键id
*/
private Long id;
/**
* 账单月份
*/
private String billMonth;
/**
* 账单状态 0-未归档 1-已归档
*/
private Integer billStatus;
/**
* 社保核算人数
*/
private Integer socialNum;
/**
* 公积金核算人数
*/
private Integer fundNum;
/**
* 其他福利核算人数
*/
private Integer otherNum;
/**
* 社保缴费总额(单位+个人)
*/
private String socialPay;
/**
* 公积金缴费总额(单位+个人)
*/
private String fundPay;
/**
* 其他福利缴费总额(单位+个人)
*/
private String otherPay;
/**
* 核算人
*/
private String accountant;
/**
* 备注
*/
private String remarks;
/**
* 创建人id
*/
private Long creator;
/**
* 是否删除
*/
private Integer deleteType;
/**
* 创建时间
*/
private Date createTime;
/**
* 更新时间
*/
private Date updateTime;
/**
* 租户key
*/
private String tenantKey;
}

View File

@ -0,0 +1,233 @@
package com.engine.salary.entity.siaccount.po;
import lombok.Data;
import lombok.experimental.Accessors;
import java.util.Date;
/**
* @Author weaver_cl
* @Description: TODO 核算明细表 hrsa_bill_detail
* @Date 2022/4/11
* @Version V1.0
**/
@Data
@Accessors(chain = true)
public class InsuranceAccountDetailPO {
/**
* 主键id
*/
private Long id;
/**
* 员工id
*/
private Long employeeId;
/**
* 账单月份
*/
private String billMonth;
/**
* 账单状态 0-未归档 1-已归档
*/
private Integer billStatus;
/**
* 缴纳状态
*/
private Integer paymentStatus;
/**
* 补缴月份
*/
private String supplementaryMonth;
/**
* 补缴项目
*/
private String supplementaryProjects;
/**
* 数据来源 0-系统核算 1-临时数据
*/
private Integer resourceFrom;
/**
* 社保缴纳组织
*/
private Long socialPayOrg;
/**
* 社保账号
*/
private String socialAccount;
/**
* 公积金缴纳组织
*/
private Long fundPayOrg;
/**
* 公积金账号
*/
private String fundAccount;
/**
* 补充公积金账号
*/
private String supplementFundAccount;
/**
* 其他福利缴纳组织
*/
private Long otherPayOrg;
/**
* 社保方案ID
*/
private Long socialSchemeId;
/**
* 社保缴纳基数
*/
private String socialPaymentBaseString;
/**
* 公积金方案ID
*/
private Long fundSchemeId;
/**
* 公积金缴纳基数
*/
private String fundPaymentBaseString;
/**
* 其他福利方案id
*/
private Long otherSchemeId;
/**
* 其他福利缴纳基数
*/
private String otherPaymentBaseString;
/**
* 社保个人缴费明细
*/
private String socialPerJson;
/**
* 社保个人合计
*/
private String socialPerSum;
/**
* 公积金个人缴费明细
*/
private String fundPerJson;
/**
* 公积金个人合计
*/
private String fundPerSum;
/**
* 其他福利个人缴费明细
*/
private String otherPerJson;
/**
* 其他福利个人合计
*/
private String otherPerSum;
/**
* 个人合计
*/
private String perSum;
/**
* 社保单位缴费明细
*/
private String socialComJson;
/**
* 社保单位合计
*/
private String socialComSum;
/**
* 公积金单位缴费明细
*/
private String fundComJson;
/**
* 公积金单位合计
*/
private String fundComSum;
/**
* 其他福利单位缴费明细
*/
private String otherComJson;
/**
* 其他福利单位合计
*/
private String otherComSum;
/**
* 单位合计
*/
private String comSum;
/**
* 社保合计
*/
private String socialSum;
/**
* 公积金合计
*/
private String fundSum;
/**
* 其他福利合计
*/
private String otherSum;
/**
* 合计
*/
private String total;
/**
* 创建人id
*/
private Long creator;
/**
* 是否删除
*/
private Integer deleteType;
/**
* 创建时间
*/
private Date createTime;
/**
* 更新时间
*/
private Date updateTime;
/**
* 租户key
*/
private String tenantKey;
}

View File

@ -0,0 +1,233 @@
package com.engine.salary.entity.siaccount.po;
import lombok.Data;
import lombok.experimental.Accessors;
import java.util.Date;
/**
* @Author weaver_cl
* @Description: TODO 核算明细临时表 hrsa_bill_detail_temp
* @Date 2022/4/11
* @Version V1.0
**/
@Data
@Accessors(chain = true)
public class InsuranceAccountDetailTempPO {
/**
* 主键id
*/
private Long id;
/**
* 员工id
*/
private Long employeeId;
/**
* 账单月份
*/
private String billMonth;
/**
* 账单状态 0-未归档 1-已归档
*/
private Integer billStatus;
/**
* 缴纳状态
*/
private Integer paymentStatus;
/**
* 补缴月份
*/
private String supplementaryMonth;
/**
* 补缴项目
*/
private String supplementaryProjects;
/**
* 数据来源 0-系统核算 1-临时数据
*/
private Integer resourceFrom;
/**
* 社保缴纳组织
*/
private Long socialPayOrg;
/**
* 社保账号
*/
private String socialAccount;
/**
* 公积金缴纳组织
*/
private Long fundPayOrg;
/**
* 公积金账号
*/
private String fundAccount;
/**
* 补充公积金账号
*/
private String supplementFundAccount;
/**
* 其他福利缴纳组织
*/
private Long otherPayOrg;
/**
* 社保方案ID
*/
private Long socialSchemeId;
/**
* 社保缴纳基数
*/
private String socialPaymentBaseString;
/**
* 公积金方案ID
*/
private Long fundSchemeId;
/**
* 公积金缴纳基数
*/
private String fundPaymentBaseString;
/**
* 其他福利方案id
*/
private Long otherSchemeId;
/**
* 其他福利缴纳基数
*/
private String otherPaymentBaseString;
/**
* 社保个人缴费明细
*/
private String socialPerJson;
/**
* 社保个人合计
*/
private String socialPerSum;
/**
* 公积金个人缴费明细
*/
private String fundPerJson;
/**
* 公积金个人合计
*/
private String fundPerSum;
/**
* 其他福利个人缴费明细
*/
private String otherPerJson;
/**
* 其他福利个人合计
*/
private String otherPerSum;
/**
* 个人合计
*/
private String perSum;
/**
* 社保单位缴费明细
*/
private String socialComJson;
/**
* 社保单位合计
*/
private String socialComSum;
/**
* 公积金单位缴费明细
*/
private String fundComJson;
/**
* 公积金单位合计
*/
private String fundComSum;
/**
* 其他福利单位缴费明细
*/
private String otherComJson;
/**
* 其他福利单位合计
*/
private String otherComSum;
/**
* 单位合计
*/
private String comSum;
/**
* 社保合计
*/
private String socialSum;
/**
* 公积金合计
*/
private String fundSum;
/**
* 其他福利合计
*/
private String otherSum;
/**
* 合计
*/
private String total;
/**
* 创建人id
*/
private Long creator;
/**
* 是否删除
*/
private Integer deleteType;
/**
* 创建时间
*/
private Date createTime;
/**
* 更新时间
*/
private Date updateTime;
/**
* 租户key
*/
private String tenantKey;
}

View File

@ -0,0 +1,81 @@
package com.engine.salary.entity.siaccount.po;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.Date;
/**
* @Author weaver_cl
* @Description: TODO hrsa_bill_inspect 核算检查明细表
* @Date 2022/4/11
* @Version V1.0
**/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class InsuranceAccountInspectPO {
/**
* 主键id
*/
private Long id;
/**
* 员工id
*/
private Long employeeId;
/**
* 账单月份
*/
private String billMonth;
/**
* 缴纳状态
*/
private Integer paymentStatus;
/**
* 审核状态 0-忽略 1-重置
*/
private Integer inspectStatus;
/**
* 补缴月份
*/
private String supplementaryMonth;
/**
* 补缴项目
*/
private String supplementaryProjects;
/**
* 创建人id
*/
private Long creator;
/**
* 是否删除
*/
private Integer deleteType;
/**
* 创建时间
*/
private Date createTime;
/**
* 更新时间
*/
private Date updateTime;
/**
* 租户key
*/
private String tenantKey;
}

View File

@ -29,12 +29,24 @@ alter table hrsa_scheme_detail modify id bigint auto_increment;
alter table hrsa_insurance_category modify id bigint auto_increment;
--
--
alter table hrsa_social_archives modify id bigint auto_increment;
alter table hrsa_fund_archives modify id bigint auto_increment;
alter table hrsa_other_archives modify id bigint auto_increment;
--
alter table hrsa_bill_batch modify id bigint auto_increment;
alter table hrsa_bill_detail modify id bigint auto_increment;
alter table hrsa_bill_detail_temp modify id bigint auto_increment;
alter table hrsa_bill_inspect modify id bigint auto_increment;
ALTER TABLE `ecology_hr`.`hrsa_salary_sob_default_item`
ADD COLUMN `sob_default_item_group_id` bigint(0) NOT NULL COMMENT '薪资账套默认薪资项目分类的id' AFTER `tenant_key`,

View File

@ -0,0 +1,23 @@
package com.engine.salary.mapper.siaccount;
import com.engine.salary.entity.siaccount.param.InsuranceAccountBatchParam;
import com.engine.salary.entity.siaccount.po.InsuranceAccountBatchPO;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* @Author weaver_cl
* @Description: TODO
* @Date 2022/4/11
* @Version V1.0
**/
public interface InsuranceAccountBatchMapper {
/**
* 查询福利台账列表
* @param queryParam
* @return
*/
List<InsuranceAccountBatchPO> list(@Param("param")InsuranceAccountBatchParam queryParam);
}

View File

@ -0,0 +1,64 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.engine.salary.mapper.siaccount.InsuranceAccountBatchMapper">
<resultMap id="BaseResultMap" type="com.engine.salary.entity.siaccount.po.InsuranceAccountBatchPO">
<result column="id" property="id"/>
<result column="bill_month" property="billMonth"/>
<result column="bill_status" property="billStatus"/>
<result column="social_num" property="socialNum"/>
<result column="fund_num" property="fundNum"/>
<result column="other_num" property="otherNum"/>
<result column="social_pay" property="socialPay"/>
<result column="fund_pay" property="fundPay"/>
<result column="other_pay" property="otherPay"/>
<result column="accountant" property="accountant"/>
<result column="remarks" property="remarks"/>
<result column="creator" property="creator"/>
<result column="delete_type" property="deleteType"/>
<result column="create_time" property="createTime"/>
<result column="update_time" property="updateTime"/>
<result column="tenant_key" property="tenantKey"/>
</resultMap>
<!-- 表字段 -->
<sql id="baseColumns">
t.id
, t.bill_month
, t.bill_status
, t.social_num
, t.fund_num
, t.other_num
, t.social_pay
, t.fund_pay
, t.other_pay
, t.accountant
, t.remarks
, t.creator
, t.delete_type
, t.create_time
, t.update_time
, t.tenant_key
</sql>
<sql id="paramSql">
<if test="param.startTime != null and param.startTime != '' and param.endTime != null and param.endTime != ''">
AND
t.bill_month between param.startTime and param.endTime
</if>
</sql>
<select id="list" resultMap="BaseResultMap">
SELECT
<include refid="baseColumns"/>
FROM
hrsa_bill_batch t
WHERE t.delete_type = 0
<include refid="paramSql"/>
ORDER BY t.bill_month DESC
</select>
</mapper>

View File

@ -0,0 +1,17 @@
package com.engine.salary.service;
import com.engine.salary.entity.siaccount.param.InsuranceAccountBatchParam;
import java.util.Map;
/**
* @Author weaver_cl
* @Description: TODO
* @Date 2022/4/11
* @Version V1.0
**/
public interface SIAccountService {
Map<String,Object> listPage(InsuranceAccountBatchParam insuranceAccountBatchParam);
Map<String,Object> listCommonPage(String billMonth);
}

View File

@ -0,0 +1,94 @@
package com.engine.salary.service.impl;
import com.cloudstore.eccom.result.WeaResultMsg;
import com.engine.core.impl.Service;
import com.engine.salary.biz.SIAccountBiz;
import com.engine.salary.component.SalaryWeaTable;
import com.engine.salary.entity.siaccount.bo.InsuranceAccountBO;
import com.engine.salary.entity.siaccount.dto.InsuranceAccountBatchListDTO;
import com.engine.salary.entity.siaccount.param.InsuranceAccountBatchParam;
import com.engine.salary.entity.siaccount.po.InsuranceAccountBatchPO;
import com.engine.salary.service.SIAccountService;
import java.util.*;
import com.engine.salary.util.page.PageInfo;
/**
* @Author weaver_cl
* @Description: TODO
* @Date 2022/4/11
* @Version V1.0
**/
public class SIAccountServiceImpl extends Service implements SIAccountService {
private SIAccountBiz siAccountBiz = new SIAccountBiz();
@Override
public Map<String, Object> listPage(InsuranceAccountBatchParam queryParam) {
Long employeeId = (long)user.getUID();
Map<String,Object> datas = new HashMap<>();
//福利台账列表
PageInfo<InsuranceAccountBatchPO> pageInfo = siAccountBiz.listPage(queryParam,employeeId);
Collection<InsuranceAccountBatchPO> insuranceAccountBatchPOS = pageInfo.getList();
List<InsuranceAccountBatchListDTO> insuranceAccountBatchListDTOS = InsuranceAccountBO.buildAccountBatchDTOList(insuranceAccountBatchPOS);
PageInfo<InsuranceAccountBatchListDTO> pageInfos = new PageInfo<>(insuranceAccountBatchListDTOS,InsuranceAccountBatchListDTO.class);
pageInfos.setTotal(insuranceAccountBatchListDTOS.size());
pageInfos.setPageNum(queryParam.getCurrent());
pageInfos.setPageSize(queryParam.getPageSize());
SalaryWeaTable<InsuranceAccountBatchListDTO> table = new SalaryWeaTable<>(user, InsuranceAccountBatchListDTO.class);
//table.getColumns().get(0).setFixed("left");
WeaResultMsg result = new WeaResultMsg(false);
result.putAll(table.makeDataResult());
result.success();
datas.put("pageInfo", pageInfos);
//datas.put("dataKey",result.getResultMap());
return datas;
// WeaTable<InsuranceAccountBatchListDTO> resultTable = FormatManager.<InsuranceAccountBatchListDTO>getInstance()
// .genTable(InsuranceAccountBatchListDTO.class, insuranceAccountBatchListDTOPage);
//
// resultTable.getOperates().forEach(e -> {
// if (e.getIndex() == 0) {
// e.setOuter(true);
// }
// });
// for (int i = 0; i < insuranceAccountBatchListDTOPage.getRecords().size(); i++) {
// InsuranceAccountBatchListDTO insuranceAccountBatchListDTO = insuranceAccountBatchListDTOPage.getRecords().get(i);
// if (Objects.equals(insuranceAccountBatchListDTO.getBillStatus(), BillStatusEnum.ARCHIVED.getDefaultLabel())) {
// resultTable.getOperatesPermission().get(i).get(0).setVisible(false);
// resultTable.getOperatesPermission().get(i).get(1).setVisible(false);
// resultTable.getOperatesPermission().get(i).get(2).setVisible(false);
// resultTable.getOperatesPermission().get(i).get(3).setVisible(false);
// resultTable.getOperates().get(4).setOuter(true);
// }
// if (Objects.equals(insuranceAccountBatchListDTO.getBillStatus(), BillStatusEnum.NOT_ARCHIVED.getDefaultLabel())) {
// resultTable.getOperatesPermission().get(i).get(4).setVisible(false);
// List<InsuranceAccountInspectPO> insuranceAccountInspectPOS = siAccountInspectService.listByBillMonth(insuranceAccountBatchListDTO.getBillMonth(), tenantKey);
// if (CollectionUtils.isEmpty(insuranceAccountInspectPOS)) {
// resultTable.getOperatesPermission().get(i).get(2).setVisible(false);
// }
// }
// }
// resultTable.setModule("hrmsalary");
// resultTable.getColumns().get(0).setFixed("left");
// return WeaResult.success(resultTable);
}
@Override
public Map<String, Object> listCommonPage(String billMonth) {
Long employeeId = (long)user.getUID();
Map<String,Object> datas = new HashMap<>();
return null;
}
}

View File

@ -0,0 +1,60 @@
package com.engine.salary.web;
import com.engine.common.util.ServiceUtil;
import com.engine.salary.entity.salaryarchive.param.SalaryArchiveQueryParam;
import com.engine.salary.entity.siaccount.param.InsuranceAccountBatchParam;
import com.engine.salary.service.SIAccountService;
import com.engine.salary.service.impl.SIAccountServiceImpl;
import com.engine.salary.util.ResponseResult;
import io.swagger.v3.oas.annotations.parameters.RequestBody;
import weaver.hrm.HrmUserVarify;
import weaver.hrm.User;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.ws.rs.*;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.MediaType;
import java.util.Map;
/**
* @Author weaver_cl
* @Description: TODO 福利核算控制器
* @Date 2022/4/11
* @Version V1.0
**/
public class SIAccountController {
public SIAccountService getService(User user) {
return ServiceUtil.getService(SIAccountServiceImpl.class,user);
}
/**
* 获取台账列表页
* @param request
* @param response
* @return
*/
@GET
@Path("/batch/list")
@Produces(MediaType.APPLICATION_JSON)
public String list(@Context HttpServletRequest request, @Context HttpServletResponse response,@RequestBody InsuranceAccountBatchParam insuranceAccountBatchParam) {
User user = HrmUserVarify.getUser(request, response);
return new ResponseResult<InsuranceAccountBatchParam, Map<String, Object>>().run(getService(user)::listPage, insuranceAccountBatchParam);
}
@GET
@Path("/detail/common/list")
@Produces(MediaType.APPLICATION_JSON)
public String commonList(@Context HttpServletRequest request, @Context HttpServletResponse response,
@QueryParam("billMonth") String billMonth) {
User user = HrmUserVarify.getUser(request, response);
return new ResponseResult<String, Map<String, Object>>().run(getService(user)::listCommonPage, billMonth);
}
}