diff --git a/src/com/api/salary/web/SIAccountController.java b/src/com/api/salary/web/SIAccountController.java new file mode 100644 index 000000000..92ca9340e --- /dev/null +++ b/src/com/api/salary/web/SIAccountController.java @@ -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 { +} diff --git a/src/com/engine/salary/biz/SIAccountBiz.java b/src/com/engine/salary/biz/SIAccountBiz.java new file mode 100644 index 000000000..8d6b1dfb1 --- /dev/null +++ b/src/com/engine/salary/biz/SIAccountBiz.java @@ -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 listPage(InsuranceAccountBatchParam queryParam, Long employeeId) { + SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession(); + try { + InsuranceAccountBatchMapper insuranceAccountBatchMapper = sqlSession.getMapper(InsuranceAccountBatchMapper.class); + PageUtil.start(queryParam.getCurrent(), queryParam.getPageSize()); + List list = insuranceAccountBatchMapper.list(queryParam); + PageInfo pageInfo = new PageInfo<>(list,InsuranceAccountBatchPO.class); + return pageInfo; + }finally { + sqlSession.close(); + } + + } +} diff --git a/src/com/engine/salary/entity/siaccount/bo/InsuranceAccountBO.java b/src/com/engine/salary/entity/siaccount/bo/InsuranceAccountBO.java new file mode 100644 index 000000000..5bc24bf01 --- /dev/null +++ b/src/com/engine/salary/entity/siaccount/bo/InsuranceAccountBO.java @@ -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 buildInspectListWrapper(String billMonth, String tenantKey) { +// LambdaQueryWrapper 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 buildBatchListWrapper(String startTime, String endTime, String tenantKey) { +// LambdaQueryWrapper 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 buildAccountBatchDTOList(Collection 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 buildBillWrapper(String billMonth, PaymentStatusEnum paymentStatusEnum, Long employeeId, String tenantKey) { +// LambdaQueryWrapper 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 buildPersonBillWrapper(String startMonth, String endMonth, Long employeeId, String tenantKey) { +// LambdaQueryWrapper 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; +// } + +} diff --git a/src/com/engine/salary/entity/siaccount/dto/InsuranceAccountBatchListDTO.java b/src/com/engine/salary/entity/siaccount/dto/InsuranceAccountBatchListDTO.java new file mode 100644 index 000000000..4265676fe --- /dev/null +++ b/src/com/engine/salary/entity/siaccount/dto/InsuranceAccountBatchListDTO.java @@ -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; + + +} diff --git a/src/com/engine/salary/entity/siaccount/dto/InsuranceAccountTabDTO.java b/src/com/engine/salary/entity/siaccount/dto/InsuranceAccountTabDTO.java new file mode 100644 index 000000000..be844f4ed --- /dev/null +++ b/src/com/engine/salary/entity/siaccount/dto/InsuranceAccountTabDTO.java @@ -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> tabList; + + /** + * 核算-true + * 查看-false + */ + private boolean isShow; + + /** + * 备注 + */ + private String remarks; + + /** + * 账单月份 + */ + private String billMonth; +} diff --git a/src/com/engine/salary/entity/siaccount/dto/InsuranceAccountViewListDTO.java b/src/com/engine/salary/entity/siaccount/dto/InsuranceAccountViewListDTO.java new file mode 100644 index 000000000..069e739c8 --- /dev/null +++ b/src/com/engine/salary/entity/siaccount/dto/InsuranceAccountViewListDTO.java @@ -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; +} diff --git a/src/com/engine/salary/entity/siaccount/param/AccountParam.java b/src/com/engine/salary/entity/siaccount/param/AccountParam.java new file mode 100644 index 000000000..63706cfc6 --- /dev/null +++ b/src/com/engine/salary/entity/siaccount/param/AccountParam.java @@ -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 ids; +} diff --git a/src/com/engine/salary/entity/siaccount/param/InspectAccountParam.java b/src/com/engine/salary/entity/siaccount/param/InspectAccountParam.java new file mode 100644 index 000000000..47deeca74 --- /dev/null +++ b/src/com/engine/salary/entity/siaccount/param/InspectAccountParam.java @@ -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 ids; + + //账单月份") + private String billMonth; +} diff --git a/src/com/engine/salary/entity/siaccount/param/InsuranceAccountBatchParam.java b/src/com/engine/salary/entity/siaccount/param/InsuranceAccountBatchParam.java new file mode 100644 index 000000000..2f40b75cf --- /dev/null +++ b/src/com/engine/salary/entity/siaccount/param/InsuranceAccountBatchParam.java @@ -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; +} diff --git a/src/com/engine/salary/entity/siaccount/param/SaveCommonAccountParam.java b/src/com/engine/salary/entity/siaccount/param/SaveCommonAccountParam.java new file mode 100644 index 000000000..14b6eded1 --- /dev/null +++ b/src/com/engine/salary/entity/siaccount/param/SaveCommonAccountParam.java @@ -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 includes; + + //剔除人员") + private List excludes; + + //账单月份") + private String billMonth; +} diff --git a/src/com/engine/salary/entity/siaccount/param/SaveSupplementaryAccountParam.java b/src/com/engine/salary/entity/siaccount/param/SaveSupplementaryAccountParam.java new file mode 100644 index 000000000..2ce919024 --- /dev/null +++ b/src/com/engine/salary/entity/siaccount/param/SaveSupplementaryAccountParam.java @@ -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 billMonthList; + + //补缴项目") + @JSONField(serializeUsing = ToStringSerializer.class) + private List projects; + + //包含人员") + @JSONField(serializeUsing = ToStringSerializer.class) + private List includes; + + //排除人员") + @JSONField(serializeUsing = ToStringSerializer.class) + private List excludes; + + //账单月份") + private String billMonth; +} diff --git a/src/com/engine/salary/entity/siaccount/param/SupplementAccountBaseParam.java b/src/com/engine/salary/entity/siaccount/param/SupplementAccountBaseParam.java new file mode 100644 index 000000000..09d8c3be2 --- /dev/null +++ b/src/com/engine/salary/entity/siaccount/param/SupplementAccountBaseParam.java @@ -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 projects; +} diff --git a/src/com/engine/salary/entity/siaccount/po/InsuranceAccountBatchPO.java b/src/com/engine/salary/entity/siaccount/po/InsuranceAccountBatchPO.java new file mode 100644 index 000000000..e00d9126e --- /dev/null +++ b/src/com/engine/salary/entity/siaccount/po/InsuranceAccountBatchPO.java @@ -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; + +} diff --git a/src/com/engine/salary/entity/siaccount/po/InsuranceAccountDetailPO.java b/src/com/engine/salary/entity/siaccount/po/InsuranceAccountDetailPO.java new file mode 100644 index 000000000..75e2afa05 --- /dev/null +++ b/src/com/engine/salary/entity/siaccount/po/InsuranceAccountDetailPO.java @@ -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; +} diff --git a/src/com/engine/salary/entity/siaccount/po/InsuranceAccountDetailTempPO.java b/src/com/engine/salary/entity/siaccount/po/InsuranceAccountDetailTempPO.java new file mode 100644 index 000000000..e2c012311 --- /dev/null +++ b/src/com/engine/salary/entity/siaccount/po/InsuranceAccountDetailTempPO.java @@ -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; +} diff --git a/src/com/engine/salary/entity/siaccount/po/InsuranceAccountInspectPO.java b/src/com/engine/salary/entity/siaccount/po/InsuranceAccountInspectPO.java new file mode 100644 index 000000000..a10aa3455 --- /dev/null +++ b/src/com/engine/salary/entity/siaccount/po/InsuranceAccountInspectPO.java @@ -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; +} diff --git a/src/com/engine/salary/init.sql b/src/com/engine/salary/init.sql index e5e9065e7..9d62c4f42 100644 --- a/src/com/engine/salary/init.sql +++ b/src/com/engine/salary/init.sql @@ -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`, diff --git a/src/com/engine/salary/mapper/siaccount/InsuranceAccountBatchMapper.java b/src/com/engine/salary/mapper/siaccount/InsuranceAccountBatchMapper.java new file mode 100644 index 000000000..f5be52e78 --- /dev/null +++ b/src/com/engine/salary/mapper/siaccount/InsuranceAccountBatchMapper.java @@ -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 list(@Param("param")InsuranceAccountBatchParam queryParam); +} diff --git a/src/com/engine/salary/mapper/siaccount/InsuranceAccountBatchMapper.xml b/src/com/engine/salary/mapper/siaccount/InsuranceAccountBatchMapper.xml new file mode 100644 index 000000000..a20aeca6e --- /dev/null +++ b/src/com/engine/salary/mapper/siaccount/InsuranceAccountBatchMapper.xml @@ -0,0 +1,64 @@ + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + + + AND + t.bill_month between param.startTime and param.endTime + + + + + + + + + + \ No newline at end of file diff --git a/src/com/engine/salary/service/SIAccountService.java b/src/com/engine/salary/service/SIAccountService.java new file mode 100644 index 000000000..bd69d4e5c --- /dev/null +++ b/src/com/engine/salary/service/SIAccountService.java @@ -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 listPage(InsuranceAccountBatchParam insuranceAccountBatchParam); + + Map listCommonPage(String billMonth); +} diff --git a/src/com/engine/salary/service/impl/SIAccountServiceImpl.java b/src/com/engine/salary/service/impl/SIAccountServiceImpl.java new file mode 100644 index 000000000..6856f8ccc --- /dev/null +++ b/src/com/engine/salary/service/impl/SIAccountServiceImpl.java @@ -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 listPage(InsuranceAccountBatchParam queryParam) { + Long employeeId = (long)user.getUID(); + Map datas = new HashMap<>(); + + //福利台账列表 + PageInfo pageInfo = siAccountBiz.listPage(queryParam,employeeId); + Collection insuranceAccountBatchPOS = pageInfo.getList(); + + List insuranceAccountBatchListDTOS = InsuranceAccountBO.buildAccountBatchDTOList(insuranceAccountBatchPOS); + PageInfo pageInfos = new PageInfo<>(insuranceAccountBatchListDTOS,InsuranceAccountBatchListDTO.class); + pageInfos.setTotal(insuranceAccountBatchListDTOS.size()); + pageInfos.setPageNum(queryParam.getCurrent()); + pageInfos.setPageSize(queryParam.getPageSize()); + + + SalaryWeaTable 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 resultTable = FormatManager.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 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 listCommonPage(String billMonth) { + Long employeeId = (long)user.getUID(); + Map datas = new HashMap<>(); + + return null; + } +} diff --git a/src/com/engine/salary/web/SIAccountController.java b/src/com/engine/salary/web/SIAccountController.java new file mode 100644 index 000000000..02e028204 --- /dev/null +++ b/src/com/engine/salary/web/SIAccountController.java @@ -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>().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>().run(getService(user)::listCommonPage, billMonth); + } + + + + + + +}