Merge remote-tracking branch 'remotes/origin/develop' into feature/checkImport

This commit is contained in:
sy 2022-08-30 09:30:38 +08:00
commit 457f144bc6
7 changed files with 29 additions and 11 deletions

View File

@ -39,7 +39,8 @@ public class DataCollectionEmployee {
@SalaryFormulaVar(defaultLabel = "部门ID", labelId = 86185, dataType = "string")
private Long departmentId;
//分部
//分部名
@SalaryFormulaVar(defaultLabel = "分部", labelId = 82465, dataType = "string")
private String subcompanyName;
private Long subcompanyid;
@ -98,4 +99,5 @@ public class DataCollectionEmployee {
//是否是系统管理员
private Boolean isAdmin;
}

View File

@ -83,6 +83,7 @@ public class SalaryAcctFormulaBO {
.sex(sexName)
.status(simpleEmployee.getStatus())
.departmentName(simpleEmployee.getDepartmentName())
.subcompanyName(simpleEmployee.getSubcompanyName())
.jobtitleName(simpleEmployee.getJobtitleName())
.jobcall(simpleEmployee.getJobcall())
.companystartdate(simpleEmployee.getCompanystartdate())

View File

@ -36,6 +36,8 @@ public class SalaryAcctEmployeeQueryParam extends BaseQueryParam {
//部门")
private Collection<Long> departmentIds;
//岗位")
private Collection<Long> positionIds;

View File

@ -37,6 +37,12 @@ public class SalaryFormulaEmployeeDTO {
private Long departmentId;
//分部
@SalaryFormulaVar(defaultLabel = "分部", labelId = 82465, dataType = "string")
private String subcompanyName;
//岗位
@SalaryFormulaVar(defaultLabel = "岗位", labelId = 90633, dataType = "string")
private String jobtitleName;
@ -85,4 +91,8 @@ public class SalaryFormulaEmployeeDTO {
@SalaryFormulaVar(defaultLabel = "出生日期", labelId = 98624, dataType = "string")
private String birthday;
}

View File

@ -375,14 +375,14 @@ public class TaxDeclarationBO {
//累计减免税额
BigDecimal addUpTaxDeduction = findAddUpValue(TaxDeclarationDataIndexConstant.ADD_UP_TAX_DEDUCTION, resultMap, salaryItemMap);
// 累计已预扣预缴税额
// List<SalaryAcctResultPO> resultPOS = resultMap.get(salaryItemMap.getOrDefault(TaxDeclarationDataIndexConstant.ADD_UP_ADVANCE_TAX, 0L));
// BigDecimal addUpAdvanceTax = resultPOS == null ? BigDecimal.ZERO : resultPOS.stream()
// .map(salaryAcctResultPO -> SalaryEntityUtil.empty2Zero(salaryAcctResultPO.getResultValue()))
// .min(BigDecimal::compareTo)
// .orElse(BigDecimal.ZERO);
// // 本月应补退税额
// BigDecimal refundedOrSupplementedTax = SalaryEntityUtil.reduce(resultMap.get(salaryItemMap.getOrDefault(TaxDeclarationDataIndexConstant.REFUNDED_OR_SUPPLEMENTED_TAX, 0L)),
// salaryAcctResultPO -> SalaryEntityUtil.empty2Zero(salaryAcctResultPO.getResultValue()));
List<SalaryAcctResultPO> resultPOS = resultMap.get(salaryItemMap.getOrDefault(TaxDeclarationDataIndexConstant.ADD_UP_ADVANCE_TAX, 0L));
BigDecimal addUpAdvanceTax = resultPOS == null ? BigDecimal.ZERO : resultPOS.stream()
.map(salaryAcctResultPO -> SalaryEntityUtil.empty2Zero(salaryAcctResultPO.getResultValue()))
.min(BigDecimal::compareTo)
.orElse(BigDecimal.ZERO);
// 本月应补退税额
BigDecimal refundedOrSupplementedTax = SalaryEntityUtil.reduce(resultMap.get(salaryItemMap.getOrDefault(TaxDeclarationDataIndexConstant.REFUNDED_OR_SUPPLEMENTED_TAX, 0L)),
salaryAcctResultPO -> SalaryEntityUtil.empty2Zero(salaryAcctResultPO.getResultValue()));
// 生成往期累计情况
AddUpSituation accumulatedSituation = AddUpSituation.builder()
.employeeId(employeeId)
@ -405,7 +405,7 @@ public class TaxDeclarationBO {
.addUpOtherDeduction(addUpOtherDeduction.toPlainString())
.addUpTaxExemptIncome(addUpTaxFreeIncome.toPlainString())
.addUpAllowedDonation(addUpAllowedDonation.toPlainString())
.addUpAdvanceTax(addUpTaxPayable.toPlainString())
.addUpAdvanceTax(addUpAdvanceTax.add(refundedOrSupplementedTax).toPlainString())
.addUpTaxSavings(addUpTaxDeduction.toPlainString())
.creator(taxDeclaration.getCreator())
.createTime(taxDeclaration.getCreateTime())

View File

@ -45,10 +45,12 @@
c.id as jobtitleId,
e.companystartdate as companystartdate,
e.mobile as mobile,
e.enddate as dismissdate
e.enddate as dismissdate,
sc.SUBCOMPANYNAME as subcompanyName
from hrmresource e
left join hrmdepartment d on e.departmentid = d.id
left join hrmjobtitles c on e.jobtitle = c.id
left join HrmSubCompany sc on e.SUBCOMPANYID1=sc.id
where e.status not in (7) and (e.accounttype is null or e.accounttype = 0)
<if test="collection != null and collection.size()>0">
AND e.id IN

View File

@ -288,6 +288,7 @@ public class SalaryAcctResultServiceImpl extends Service implements SalaryAcctRe
// 查询人员信息
List<Long> employeeIds = SalaryEntityUtil.properties(salaryAcctEmployeePOS, SalaryAcctEmployeePO::getEmployeeId, Collectors.toList());
List<DataCollectionEmployee> simpleEmployees = getSalaryEmployeeService(user).listByIds(employeeIds);
// 查询个税扣缴义务人
Set<Long> taxAgentIds = SalaryEntityUtil.properties(salaryAcctEmployeePOS, SalaryAcctEmployeePO::getTaxAgentId);
List<TaxAgentPO> taxAgentPOS = getTaxAgentService(user).listByIds(taxAgentIds);