Merge branch 'release/个税&业务线' into custom/钱智
This commit is contained in:
commit
8f81b38d4d
Binary file not shown.
|
|
@ -0,0 +1,3 @@
|
||||||
|
alter table hrsa_tax_payment_request add report_type number(11) null;
|
||||||
|
/
|
||||||
|
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
alter table hrsa_tax_payment_request add report_type number(11) null;
|
||||||
|
/
|
||||||
|
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
alter table hrsa_tax_payment_request add report_type number(11) null;
|
||||||
|
/
|
||||||
|
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
ALTER TABLE hrsa_tax_payment_request ADD COLUMN report_type int NULL;
|
||||||
|
|
@ -0,0 +1,2 @@
|
||||||
|
alter table hrsa_tax_payment_request add report_type number(11) null
|
||||||
|
/
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
ALTER TABLE hrsa_tax_payment_request ADD COLUMN report_type int ;
|
||||||
|
|
@ -0,0 +1,2 @@
|
||||||
|
alter table hrsa_tax_payment_request add report_type int null
|
||||||
|
go
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
alter table hrsa_tax_payment_request add report_type number(11) null;
|
||||||
|
/
|
||||||
|
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
package com.engine.salary.entity.salaryBill.param;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工资单批量操作参数
|
||||||
|
* <p>Copyright: Copyright (c) 2024</p>
|
||||||
|
* <p>Company: 泛微软件</p>
|
||||||
|
*
|
||||||
|
* @author qiantao
|
||||||
|
* @version 1.0
|
||||||
|
**/
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class SalarySendBatParam {
|
||||||
|
|
||||||
|
// 工资单发放Id
|
||||||
|
private List<Long> salarySendIds;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,34 @@
|
||||||
|
package com.engine.salary.entity.salaryacct.param;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量操作参数
|
||||||
|
* <p>Copyright: Copyright (c) 2024</p>
|
||||||
|
* <p>Company: 泛微软件</p>
|
||||||
|
*
|
||||||
|
* @author qiantao
|
||||||
|
* @version 1.0
|
||||||
|
**/
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class SalaryAcctBatParam {
|
||||||
|
|
||||||
|
//薪资所属月
|
||||||
|
private Date salaryMonth;
|
||||||
|
//薪资账套id
|
||||||
|
private List<Long> salarySobIds;
|
||||||
|
//备注
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
|
||||||
|
private List<Long> salaryAcctRecordIds;
|
||||||
|
}
|
||||||
|
|
@ -28,4 +28,6 @@ public class SalarySobQueryParam extends BaseQueryParam {
|
||||||
* 数据过滤级别
|
* 数据过滤级别
|
||||||
*/
|
*/
|
||||||
private AuthFilterTypeEnum filterType;
|
private AuthFilterTypeEnum filterType;
|
||||||
|
|
||||||
|
private boolean isShare;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,40 @@
|
||||||
|
package com.engine.salary.entity.siaccount.param;
|
||||||
|
|
||||||
|
|
||||||
|
import com.engine.salary.util.valid.DataCheck;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class AccountBatParam {
|
||||||
|
|
||||||
|
//账单月份")
|
||||||
|
//@NotNull
|
||||||
|
@DataCheck(require = true,message = "账单月份不能为空")
|
||||||
|
private String billMonth;
|
||||||
|
|
||||||
|
//备注")
|
||||||
|
//@Length(max = 60)
|
||||||
|
@DataCheck(max = 60,message = "备注长度不能超过60个字符")
|
||||||
|
private String remarks;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 个税扣缴义务人id
|
||||||
|
*/
|
||||||
|
@DataCheck(require = true,message = "个税扣缴义务人不能为空")
|
||||||
|
private List<Long> paymentOrganizations;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
private List<Long> ids;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -26,4 +26,6 @@ public class TaxAgentQueryParam extends BaseQueryParam {
|
||||||
|
|
||||||
//个税扣缴义务人名称
|
//个税扣缴义务人名称
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
|
private boolean isShare;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@ import com.engine.salary.entity.taxdeclaration.po.TaxReportColumnPO;
|
||||||
import com.engine.salary.enums.datacollection.TaxFreeTypeEnum;
|
import com.engine.salary.enums.datacollection.TaxFreeTypeEnum;
|
||||||
import com.engine.salary.enums.employeedeclare.CardTypeEnum;
|
import com.engine.salary.enums.employeedeclare.CardTypeEnum;
|
||||||
import com.engine.salary.enums.salaryitem.SalaryDataTypeEnum;
|
import com.engine.salary.enums.salaryitem.SalaryDataTypeEnum;
|
||||||
|
import com.engine.salary.enums.salarysob.DeclareReportTypeEnum;
|
||||||
import com.engine.salary.enums.salarysob.IncomeCategoryEnum;
|
import com.engine.salary.enums.salarysob.IncomeCategoryEnum;
|
||||||
import com.engine.salary.util.SalaryDateUtil;
|
import com.engine.salary.util.SalaryDateUtil;
|
||||||
import com.engine.salary.util.SalaryEntityUtil;
|
import com.engine.salary.util.SalaryEntityUtil;
|
||||||
|
|
@ -43,6 +44,10 @@ public class TaxDeclarationRequest {
|
||||||
Map<String, List<TaxReportColumnPO>> taxReportColumnMap = SalaryEntityUtil.group2Map(taxReportColumns, TaxReportColumnPO::getIncomeCategory);
|
Map<String, List<TaxReportColumnPO>> taxReportColumnMap = SalaryEntityUtil.group2Map(taxReportColumns, TaxReportColumnPO::getIncomeCategory);
|
||||||
Map<Long, EmployeeDeclarePO> employeeDeclareMap = SalaryEntityUtil.convert2Map(employeeDeclares, EmployeeDeclarePO::getEmployeeId);
|
Map<Long, EmployeeDeclarePO> employeeDeclareMap = SalaryEntityUtil.convert2Map(employeeDeclares, EmployeeDeclarePO::getEmployeeId);
|
||||||
Map<Long, List<TaxDeclarationValuePO>> taxDeclarationValueMap = SalaryEntityUtil.group2Map(taxDeclarationValues, TaxDeclarationValuePO::getTaxDeclarationId);
|
Map<Long, List<TaxDeclarationValuePO>> taxDeclarationValueMap = SalaryEntityUtil.group2Map(taxDeclarationValues, TaxDeclarationValuePO::getTaxDeclarationId);
|
||||||
|
taxDeclarations = taxDeclarations.stream()
|
||||||
|
.filter(taxDeclaration -> IncomeCategoryEnum.parseByValue(taxDeclaration.getIncomeCategory()) != null
|
||||||
|
&& IncomeCategoryEnum.parseByValue(taxDeclaration.getIncomeCategory()).getReportType()== DeclareReportTypeEnum.COMPREHENSIVE_INCOME)
|
||||||
|
.collect(Collectors.toList());
|
||||||
for (TaxDeclarationPO taxDeclaration : taxDeclarations) {
|
for (TaxDeclarationPO taxDeclaration : taxDeclarations) {
|
||||||
List<TaxDeclarationValuePO> values = taxDeclarationValueMap.get(taxDeclaration.getId());
|
List<TaxDeclarationValuePO> values = taxDeclarationValueMap.get(taxDeclaration.getId());
|
||||||
for (TaxDeclarationValuePO taxDeclarationValue : values) {
|
for (TaxDeclarationValuePO taxDeclarationValue : values) {
|
||||||
|
|
@ -338,6 +343,10 @@ public class TaxDeclarationRequest {
|
||||||
Map<String, List<TaxReportColumnPO>> taxReportColumnMap = SalaryEntityUtil.group2Map(taxReportColumns, TaxReportColumnPO::getIncomeCategory);
|
Map<String, List<TaxReportColumnPO>> taxReportColumnMap = SalaryEntityUtil.group2Map(taxReportColumns, TaxReportColumnPO::getIncomeCategory);
|
||||||
Map<Long, EmployeeDeclarePO> employeeDeclareMap = SalaryEntityUtil.convert2Map(employeeDeclares, EmployeeDeclarePO::getEmployeeId);
|
Map<Long, EmployeeDeclarePO> employeeDeclareMap = SalaryEntityUtil.convert2Map(employeeDeclares, EmployeeDeclarePO::getEmployeeId);
|
||||||
Map<Long, List<TaxDeclarationValuePO>> taxDeclarationValueMap = SalaryEntityUtil.group2Map(taxDeclarationValues, TaxDeclarationValuePO::getTaxDeclarationId);
|
Map<Long, List<TaxDeclarationValuePO>> taxDeclarationValueMap = SalaryEntityUtil.group2Map(taxDeclarationValues, TaxDeclarationValuePO::getTaxDeclarationId);
|
||||||
|
taxDeclarations = taxDeclarations.stream()
|
||||||
|
.filter(taxDeclaration -> IncomeCategoryEnum.parseByValue(taxDeclaration.getIncomeCategory()) != null
|
||||||
|
&& IncomeCategoryEnum.parseByValue(taxDeclaration.getIncomeCategory()).getReportType()== DeclareReportTypeEnum.CLASSIFIED_INCOME)
|
||||||
|
.collect(Collectors.toList());
|
||||||
for (TaxDeclarationPO taxDeclaration : taxDeclarations) {
|
for (TaxDeclarationPO taxDeclaration : taxDeclarations) {
|
||||||
List<TaxDeclarationValuePO> values = taxDeclarationValueMap.get(taxDeclaration.getId());
|
List<TaxDeclarationValuePO> values = taxDeclarationValueMap.get(taxDeclaration.getId());
|
||||||
IncomeCategoryEnum incomeCategoryEnum = IncomeCategoryEnum.parseByValue(taxDeclaration.getIncomeCategory());
|
IncomeCategoryEnum incomeCategoryEnum = IncomeCategoryEnum.parseByValue(taxDeclaration.getIncomeCategory());
|
||||||
|
|
@ -380,6 +389,10 @@ public class TaxDeclarationRequest {
|
||||||
Map<String, List<TaxReportColumnPO>> taxReportColumnMap = SalaryEntityUtil.group2Map(taxReportColumns, TaxReportColumnPO::getIncomeCategory);
|
Map<String, List<TaxReportColumnPO>> taxReportColumnMap = SalaryEntityUtil.group2Map(taxReportColumns, TaxReportColumnPO::getIncomeCategory);
|
||||||
Map<Long, EmployeeDeclarePO> employeeDeclareMap = SalaryEntityUtil.convert2Map(employeeDeclares, EmployeeDeclarePO::getEmployeeId);
|
Map<Long, EmployeeDeclarePO> employeeDeclareMap = SalaryEntityUtil.convert2Map(employeeDeclares, EmployeeDeclarePO::getEmployeeId);
|
||||||
Map<Long, List<TaxDeclarationValuePO>> taxDeclarationValueMap = SalaryEntityUtil.group2Map(taxDeclarationValues, TaxDeclarationValuePO::getTaxDeclarationId);
|
Map<Long, List<TaxDeclarationValuePO>> taxDeclarationValueMap = SalaryEntityUtil.group2Map(taxDeclarationValues, TaxDeclarationValuePO::getTaxDeclarationId);
|
||||||
|
taxDeclarations = taxDeclarations.stream()
|
||||||
|
.filter(taxDeclaration -> IncomeCategoryEnum.parseByValue(taxDeclaration.getIncomeCategory()) != null
|
||||||
|
&& IncomeCategoryEnum.parseByValue(taxDeclaration.getIncomeCategory()).getReportType()== DeclareReportTypeEnum.NONRESIDENT_INCOME)
|
||||||
|
.collect(Collectors.toList());
|
||||||
for (TaxDeclarationPO taxDeclaration : taxDeclarations) {
|
for (TaxDeclarationPO taxDeclaration : taxDeclarations) {
|
||||||
List<TaxDeclarationValuePO> values = taxDeclarationValueMap.get(taxDeclaration.getId());
|
List<TaxDeclarationValuePO> values = taxDeclarationValueMap.get(taxDeclaration.getId());
|
||||||
for (TaxDeclarationValuePO taxDeclarationValue : values) {
|
for (TaxDeclarationValuePO taxDeclarationValue : values) {
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,53 @@
|
||||||
|
package com.engine.salary.entity.taxdeclaration.param;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生成个税申报表参数
|
||||||
|
* <p>Copyright: Copyright (c) 2022</p>
|
||||||
|
* <p>Company: 泛微软件</p>
|
||||||
|
*
|
||||||
|
* @author qiantao
|
||||||
|
* @version 1.0
|
||||||
|
**/
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class TaxDeclarationBatParam {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 个税申报id
|
||||||
|
*/
|
||||||
|
private Long taxDeclarationId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 薪资所属月
|
||||||
|
*/
|
||||||
|
private Date salaryMonth;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 个税扣缴义务人
|
||||||
|
*/
|
||||||
|
private List<Long> taxAgentIds;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
private String salaryMonthStr;
|
||||||
|
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||||
|
private Date taxCycle;
|
||||||
|
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||||
|
private Date salaryDate;
|
||||||
|
}
|
||||||
|
|
@ -73,6 +73,8 @@ public class TaxPaymentRequestPO implements Serializable {
|
||||||
//是否已获取反馈")
|
//是否已获取反馈")
|
||||||
private Integer feedback;
|
private Integer feedback;
|
||||||
|
|
||||||
|
private Integer reportType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 租户key
|
* 租户key
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -79,8 +79,6 @@ public interface TaxPaymentRequestMapper {
|
||||||
|
|
||||||
void updateFeedbackByRequestTypeTaxAgentIdTaxYearMonth(TaxPaymentRequestPO build);
|
void updateFeedbackByRequestTypeTaxAgentIdTaxYearMonth(TaxPaymentRequestPO build);
|
||||||
|
|
||||||
void updateFeedbackByTaxDeclareRecordId(TaxPaymentRequestPO build);
|
|
||||||
|
|
||||||
TaxPaymentRequestPO getOne(TaxPaymentRequestPO build);
|
TaxPaymentRequestPO getOne(TaxPaymentRequestPO build);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -14,6 +14,7 @@
|
||||||
<result column="tax_year_month" property="taxYearMonth"/>
|
<result column="tax_year_month" property="taxYearMonth"/>
|
||||||
<result column="tenant_key" property="tenantKey"/>
|
<result column="tenant_key" property="tenantKey"/>
|
||||||
<result column="update_time" property="updateTime"/>
|
<result column="update_time" property="updateTime"/>
|
||||||
|
<result column="report_type" property="reportType"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<!-- 表字段 -->
|
<!-- 表字段 -->
|
||||||
|
|
@ -32,6 +33,7 @@
|
||||||
, t.tax_year_month
|
, t.tax_year_month
|
||||||
, t.tenant_key
|
, t.tenant_key
|
||||||
, t.update_time
|
, t.update_time
|
||||||
|
, t.report_type
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<!-- 查询全部 -->
|
<!-- 查询全部 -->
|
||||||
|
|
@ -93,6 +95,9 @@
|
||||||
<if test="updateTime != null">
|
<if test="updateTime != null">
|
||||||
AND update_time = #{updateTime}
|
AND update_time = #{updateTime}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="reportType != null">
|
||||||
|
AND report_type = #{reportType}
|
||||||
|
</if>
|
||||||
<if test="ids != null and ids.size()>0">
|
<if test="ids != null and ids.size()>0">
|
||||||
AND id IN
|
AND id IN
|
||||||
<foreach collection="ids" open="(" item="id" separator="," close=")">
|
<foreach collection="ids" open="(" item="id" separator="," close=")">
|
||||||
|
|
@ -142,7 +147,10 @@
|
||||||
tenant_key,
|
tenant_key,
|
||||||
</if>
|
</if>
|
||||||
<if test="updateTime != null">
|
<if test="updateTime != null">
|
||||||
update_time
|
update_time,
|
||||||
|
</if>
|
||||||
|
<if test="reportType != null">
|
||||||
|
report_type
|
||||||
</if>
|
</if>
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="VALUES (" suffix=")" suffixOverrides=",">
|
<trim prefix="VALUES (" suffix=")" suffixOverrides=",">
|
||||||
|
|
@ -180,7 +188,10 @@
|
||||||
#{tenantKey},
|
#{tenantKey},
|
||||||
</if>
|
</if>
|
||||||
<if test="updateTime != null">
|
<if test="updateTime != null">
|
||||||
#{updateTime}
|
#{updateTime},
|
||||||
|
</if>
|
||||||
|
<if test="reportType != null">
|
||||||
|
#{reportType}
|
||||||
</if>
|
</if>
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
@ -201,7 +212,8 @@
|
||||||
tax_declare_record_id,
|
tax_declare_record_id,
|
||||||
tax_year_month,
|
tax_year_month,
|
||||||
tenant_key,
|
tenant_key,
|
||||||
update_time
|
update_time,
|
||||||
|
report_type
|
||||||
)
|
)
|
||||||
VALUES
|
VALUES
|
||||||
(
|
(
|
||||||
|
|
@ -217,7 +229,8 @@
|
||||||
#{item.taxDeclareRecordId},
|
#{item.taxDeclareRecordId},
|
||||||
#{item.taxYearMonth},
|
#{item.taxYearMonth},
|
||||||
#{item.tenantKey},
|
#{item.tenantKey},
|
||||||
#{item.updateTime}
|
#{item.updateTime},
|
||||||
|
#{item.reportType}
|
||||||
</foreach>
|
</foreach>
|
||||||
)
|
)
|
||||||
</insert>
|
</insert>
|
||||||
|
|
@ -236,7 +249,8 @@
|
||||||
tax_declare_record_id,
|
tax_declare_record_id,
|
||||||
tax_year_month,
|
tax_year_month,
|
||||||
tenant_key,
|
tenant_key,
|
||||||
update_time
|
update_time,
|
||||||
|
report_type
|
||||||
)
|
)
|
||||||
|
|
||||||
<foreach collection="collection" item="item" separator="union all">
|
<foreach collection="collection" item="item" separator="union all">
|
||||||
|
|
@ -252,7 +266,8 @@
|
||||||
#{item.taxDeclareRecordId,jdbcType=DOUBLE},
|
#{item.taxDeclareRecordId,jdbcType=DOUBLE},
|
||||||
#{item.taxYearMonth,jdbcType=DATE},
|
#{item.taxYearMonth,jdbcType=DATE},
|
||||||
#{item.tenantKey,jdbcType=VARCHAR},
|
#{item.tenantKey,jdbcType=VARCHAR},
|
||||||
#{item.updateTime,jdbcType=DATE}
|
#{item.updateTime,jdbcType=DATE},
|
||||||
|
#{item.reportType,jdbcType=INTEGER}
|
||||||
from dual
|
from dual
|
||||||
</foreach>
|
</foreach>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
@ -272,7 +287,8 @@
|
||||||
tax_declare_record_id,
|
tax_declare_record_id,
|
||||||
tax_year_month,
|
tax_year_month,
|
||||||
tenant_key,
|
tenant_key,
|
||||||
update_time
|
update_time,
|
||||||
|
report_type
|
||||||
)
|
)
|
||||||
VALUES
|
VALUES
|
||||||
(
|
(
|
||||||
|
|
@ -287,7 +303,8 @@
|
||||||
#{item.taxDeclareRecordId},
|
#{item.taxDeclareRecordId},
|
||||||
#{item.taxYearMonth},
|
#{item.taxYearMonth},
|
||||||
#{item.tenantKey},
|
#{item.tenantKey},
|
||||||
#{item.updateTime}
|
#{item.updateTime},
|
||||||
|
#{item.reportType}
|
||||||
)
|
)
|
||||||
</foreach>
|
</foreach>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
@ -307,6 +324,7 @@
|
||||||
tax_year_month=#{taxYearMonth},
|
tax_year_month=#{taxYearMonth},
|
||||||
tenant_key=#{tenantKey},
|
tenant_key=#{tenantKey},
|
||||||
update_time=#{updateTime},
|
update_time=#{updateTime},
|
||||||
|
report_type=#{reportType},
|
||||||
</set>
|
</set>
|
||||||
WHERE id = #{id} AND delete_type = 0
|
WHERE id = #{id} AND delete_type = 0
|
||||||
</update>
|
</update>
|
||||||
|
|
@ -349,6 +367,9 @@
|
||||||
<if test="updateTime != null">
|
<if test="updateTime != null">
|
||||||
update_time=#{updateTime},
|
update_time=#{updateTime},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="reportType != null">
|
||||||
|
report_type=#{reportType},
|
||||||
|
</if>
|
||||||
</set>
|
</set>
|
||||||
WHERE id = #{id} AND delete_type = 0
|
WHERE id = #{id} AND delete_type = 0
|
||||||
</update>
|
</update>
|
||||||
|
|
@ -385,17 +406,9 @@
|
||||||
AND request_type=#{requestType}
|
AND request_type=#{requestType}
|
||||||
AND tax_agent_id=#{taxAgentId}
|
AND tax_agent_id=#{taxAgentId}
|
||||||
AND tax_year_month=#{taxYearMonth}
|
AND tax_year_month=#{taxYearMonth}
|
||||||
|
AND report_type=#{reportType}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<update id="updateFeedbackByTaxDeclareRecordId"
|
|
||||||
parameterType="com.engine.salary.entity.taxpayment.po.TaxPaymentRequestPO">
|
|
||||||
UPDATE hrsa_tax_payment_request
|
|
||||||
<set>
|
|
||||||
feedback=#{feedback}
|
|
||||||
</set>
|
|
||||||
WHERE delete_type = 0
|
|
||||||
AND tax_declare_record_id=#{taxDeclareRecordId}
|
|
||||||
</update>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- 根据主键获取单条记录 -->
|
<!-- 根据主键获取单条记录 -->
|
||||||
|
|
@ -407,6 +420,7 @@
|
||||||
AND request_type = #{requestType}
|
AND request_type = #{requestType}
|
||||||
AND tax_agent_id = #{taxAgentId}
|
AND tax_agent_id = #{taxAgentId}
|
||||||
AND tax_year_month = #{taxYearMonth}
|
AND tax_year_month = #{taxYearMonth}
|
||||||
|
AND report_type = #{reportType}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
@ -303,6 +303,7 @@ public class SalaryStatisticsReportWrapper extends Service {
|
||||||
// 如果是被分享的报表,校验分享权限,通过后将user赋值为报表创建人
|
// 如果是被分享的报表,校验分享权限,通过后将user赋值为报表创建人
|
||||||
User creator = new User();
|
User creator = new User();
|
||||||
creator.setUid(po.getCreator().intValue());
|
creator.setUid(po.getCreator().intValue());
|
||||||
|
creator.setLogintype("1");
|
||||||
user = creator;
|
user = creator;
|
||||||
} else {
|
} else {
|
||||||
// 判断报表是否是登陆人创建的,或薪酬总管理员
|
// 判断报表是否是登陆人创建的,或薪酬总管理员
|
||||||
|
|
|
||||||
|
|
@ -324,5 +324,13 @@ public interface SIAccountService {
|
||||||
void deleteSocialAcctEmp(SaveCommonAccountParam param);
|
void deleteSocialAcctEmp(SaveCommonAccountParam param);
|
||||||
|
|
||||||
String addSocialAcctEmp(SaveCommonAccountParam param);
|
String addSocialAcctEmp(SaveCommonAccountParam param);
|
||||||
|
|
||||||
|
void batSave(AccountBatParam param);
|
||||||
|
|
||||||
|
void batDelete(AccountBatParam param);
|
||||||
|
|
||||||
|
void batFile(AccountBatParam param);
|
||||||
|
|
||||||
|
void batSocialSecurityBenefitsRecalculate(AccountBatParam batParam);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
package com.engine.salary.service;
|
package com.engine.salary.service;
|
||||||
|
|
||||||
import com.engine.salary.common.LocalDateRange;
|
import com.engine.salary.common.LocalDateRange;
|
||||||
|
import com.engine.salary.entity.salaryacct.param.SalaryAcctBatParam;
|
||||||
import com.engine.salary.entity.salaryacct.param.SalaryAcctRecordQueryParam;
|
import com.engine.salary.entity.salaryacct.param.SalaryAcctRecordQueryParam;
|
||||||
import com.engine.salary.entity.salaryacct.param.SalaryAcctRecordSaveParam;
|
import com.engine.salary.entity.salaryacct.param.SalaryAcctRecordSaveParam;
|
||||||
import com.engine.salary.entity.salaryacct.po.SalaryAcctRecordPO;
|
import com.engine.salary.entity.salaryacct.po.SalaryAcctRecordPO;
|
||||||
|
|
@ -227,4 +228,11 @@ public interface SalaryAcctRecordService {
|
||||||
*/
|
*/
|
||||||
List<SalaryAcctTaxAgentPO> listBySalaryAcctRecordIds(Collection<Long> salaryAcctRecordIds);
|
List<SalaryAcctTaxAgentPO> listBySalaryAcctRecordIds(Collection<Long> salaryAcctRecordIds);
|
||||||
|
|
||||||
|
|
||||||
|
void batSave(SalaryAcctBatParam saveParam);
|
||||||
|
|
||||||
|
void batFile(SalaryAcctBatParam param);
|
||||||
|
|
||||||
|
void batReCalculate(SalaryAcctBatParam param);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@ import com.engine.salary.entity.taxagent.po.TaxAgentTaxReturnPO;
|
||||||
import com.engine.salary.entity.taxagent.response.SzyhResponseHead;
|
import com.engine.salary.entity.taxagent.response.SzyhResponseHead;
|
||||||
import com.engine.salary.entity.taxdeclaration.po.TaxDeclarationApiConfigPO;
|
import com.engine.salary.entity.taxdeclaration.po.TaxDeclarationApiConfigPO;
|
||||||
import com.engine.salary.entity.taxdeclaration.po.TaxDeclareRecordPO;
|
import com.engine.salary.entity.taxdeclaration.po.TaxDeclareRecordPO;
|
||||||
|
import com.engine.salary.entity.taxdeclaration.po.TaxDeclareStatusPO;
|
||||||
import com.engine.salary.entity.taxpayment.dto.TaxAmountFormDTO;
|
import com.engine.salary.entity.taxpayment.dto.TaxAmountFormDTO;
|
||||||
import com.engine.salary.entity.taxpayment.dto.TaxFeedbackResultDTO;
|
import com.engine.salary.entity.taxpayment.dto.TaxFeedbackResultDTO;
|
||||||
import com.engine.salary.entity.taxpayment.dto.TaxWithheldVoucherResultDTO;
|
import com.engine.salary.entity.taxpayment.dto.TaxWithheldVoucherResultDTO;
|
||||||
|
|
@ -34,7 +35,6 @@ import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import weaver.hrm.User;
|
import weaver.hrm.User;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -54,6 +54,7 @@ public abstract class AbstractTaxPaymentService extends Service implements TaxPa
|
||||||
protected TaxDeclareStatusService getTaxDeclareStatusService(User user) {
|
protected TaxDeclareStatusService getTaxDeclareStatusService(User user) {
|
||||||
return ServiceUtil.getService(TaxDeclareStatusServiceImpl.class, user);
|
return ServiceUtil.getService(TaxDeclareStatusServiceImpl.class, user);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected TaxAgentService getTaxAgentService(User user) {
|
protected TaxAgentService getTaxAgentService(User user) {
|
||||||
return ServiceUtil.getService(TaxAgentServiceImpl.class, user);
|
return ServiceUtil.getService(TaxAgentServiceImpl.class, user);
|
||||||
}
|
}
|
||||||
|
|
@ -172,6 +173,7 @@ public abstract class AbstractTaxPaymentService extends Service implements TaxPa
|
||||||
.requestType(param.getType())
|
.requestType(param.getType())
|
||||||
.taxAgentId(param.getTaxAgentId())
|
.taxAgentId(param.getTaxAgentId())
|
||||||
.taxYearMonth(param.getTaxYearMonth())
|
.taxYearMonth(param.getTaxYearMonth())
|
||||||
|
.reportType(param.getReportType())
|
||||||
.build());
|
.build());
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -189,6 +191,7 @@ public abstract class AbstractTaxPaymentService extends Service implements TaxPa
|
||||||
.requestId(requestId)
|
.requestId(requestId)
|
||||||
.requestType(param.getType())
|
.requestType(param.getType())
|
||||||
.feedback(SalaryOnOffEnum.OFF.getValue())
|
.feedback(SalaryOnOffEnum.OFF.getValue())
|
||||||
|
.reportType(param.getReportType())
|
||||||
.build();
|
.build();
|
||||||
getTaxPaymentRequestMapper().insertIgnoreNull(paymentRequestPO);
|
getTaxPaymentRequestMapper().insertIgnoreNull(paymentRequestPO);
|
||||||
}
|
}
|
||||||
|
|
@ -200,6 +203,7 @@ public abstract class AbstractTaxPaymentService extends Service implements TaxPa
|
||||||
.builder()
|
.builder()
|
||||||
.taxAgentId(param.getTaxAgentId())
|
.taxAgentId(param.getTaxAgentId())
|
||||||
.taxYearMonth(param.getTaxYearMonth())
|
.taxYearMonth(param.getTaxYearMonth())
|
||||||
|
.reportType(param.getReportType())
|
||||||
.build());
|
.build());
|
||||||
if (Objects.isNull(param.getCheckFeedback()) || SalaryOnOffEnum.ON.getValue().equals(param.getCheckFeedback())) {
|
if (Objects.isNull(param.getCheckFeedback()) || SalaryOnOffEnum.ON.getValue().equals(param.getCheckFeedback())) {
|
||||||
TaxPaymentRequestPO notFeedback = paymentRequests.stream()
|
TaxPaymentRequestPO notFeedback = paymentRequests.stream()
|
||||||
|
|
@ -226,6 +230,7 @@ public abstract class AbstractTaxPaymentService extends Service implements TaxPa
|
||||||
.requestType(getServiceType())
|
.requestType(getServiceType())
|
||||||
.taxAgentId(param.getTaxAgentId())
|
.taxAgentId(param.getTaxAgentId())
|
||||||
.taxYearMonth(param.getTaxYearMonth())
|
.taxYearMonth(param.getTaxYearMonth())
|
||||||
|
.reportType(param.getReportType())
|
||||||
.build());
|
.build());
|
||||||
SalaryAssert.notNull(paymentRequest, "请先点击[三方缴款]或[银行端凭证缴款]按钮发起缴款请求后,再点击[缴款反馈]按钮");
|
SalaryAssert.notNull(paymentRequest, "请先点击[三方缴款]或[银行端凭证缴款]按钮发起缴款请求后,再点击[缴款反馈]按钮");
|
||||||
paymentRequest.setFeedback(SalaryOnOffEnum.ON.getValue());
|
paymentRequest.setFeedback(SalaryOnOffEnum.ON.getValue());
|
||||||
|
|
@ -256,10 +261,11 @@ public abstract class AbstractTaxPaymentService extends Service implements TaxPa
|
||||||
public TaxAmountFormDTO queryTaxAmount(TaxPaymentQueryParam param) {
|
public TaxAmountFormDTO queryTaxAmount(TaxPaymentQueryParam param) {
|
||||||
TaxDeclareRecordPO taxDeclareRecord = getTaxDeclareRecordService(user).getById(param.getTaxDeclareRecordId());
|
TaxDeclareRecordPO taxDeclareRecord = getTaxDeclareRecordService(user).getById(param.getTaxDeclareRecordId());
|
||||||
SalaryAssert.notNull(taxDeclareRecord, "个税申报记录不存在");
|
SalaryAssert.notNull(taxDeclareRecord, "个税申报记录不存在");
|
||||||
if (!TaxDeclareStatusEnum.DECLARE_SUCCESS_UNPAID.getValue().equals(taxDeclareRecord.getTaxDeclareStatus())) {
|
TaxDeclareStatusPO taxDeclareStatus = getTaxDeclareStatusService(user).getTaxDeclareStatus(param.getTaxDeclareRecordId(), param.getReportType());
|
||||||
|
if (!TaxDeclareStatusEnum.DECLARE_SUCCESS_UNPAID.getValue().equals(taxDeclareStatus.getTaxDeclareStatus())) {
|
||||||
throw new SalaryRunTimeException("当前申报状态不是[申报成功,未缴费],暂时无法获取");
|
throw new SalaryRunTimeException("当前申报状态不是[申报成功,未缴费],暂时无法获取");
|
||||||
}
|
}
|
||||||
if (taxDeclareRecord.getTaxPayAmount() == null || taxDeclareRecord.getPersonNum() == null) {
|
if (taxDeclareStatus.getTaxPayAmount() == null || taxDeclareStatus.getPersonNum() == null) {
|
||||||
throw new SalaryRunTimeException("未获取到应缴信息,请先进行个税在线申报");
|
throw new SalaryRunTimeException("未获取到应缴信息,请先进行个税在线申报");
|
||||||
}
|
}
|
||||||
TaxAgentPO taxAgentPO = getTaxAgentService(user).getById(taxDeclareRecord.getTaxAgentId());
|
TaxAgentPO taxAgentPO = getTaxAgentService(user).getById(taxDeclareRecord.getTaxAgentId());
|
||||||
|
|
@ -267,32 +273,11 @@ public abstract class AbstractTaxPaymentService extends Service implements TaxPa
|
||||||
|
|
||||||
return TaxAmountFormDTO.builder()
|
return TaxAmountFormDTO.builder()
|
||||||
.taxAgent(taxAgentPO.getName())
|
.taxAgent(taxAgentPO.getName())
|
||||||
.amount(SalaryEntityUtil.thousandthConvert(taxDeclareRecord.getTaxPayAmount()))
|
.amount(SalaryEntityUtil.thousandthConvert(taxDeclareStatus.getTaxPayAmount()))
|
||||||
.personNum(taxDeclareRecord.getPersonNum().toString())
|
.personNum(taxDeclareStatus.getPersonNum().toString())
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected TaxDeclareRecordPO updateTaxDeclareRecord(TaxPaymentQueryParam param, BigDecimal totalPaid) {
|
|
||||||
TaxDeclareRecordPO taxDeclareRecord = getTaxDeclareRecordService(user).getById(param.getTaxDeclareRecordId());
|
|
||||||
if (TaxDeclareStatusEnum.DECLARE_SUCCESS_PAID.getValue().equals(taxDeclareRecord.getTaxDeclareStatus())) {
|
|
||||||
throw new SalaryRunTimeException("当前申报表状态为已缴款,无法更新状态");
|
|
||||||
}
|
|
||||||
BigDecimal taxPayAmount = SalaryEntityUtil.empty2Zero(taxDeclareRecord.getTaxPayAmount());
|
|
||||||
BigDecimal taxPurePaidAmount = SalaryEntityUtil.empty2Zero(taxDeclareRecord.getTaxPurePaidAmount());
|
|
||||||
if (SalaryEntityUtil.empty2Zero(taxDeclareRecord.getTaxPaidAmount()).equals(totalPaid)
|
|
||||||
&& taxPayAmount.compareTo(BigDecimal.ZERO) > 0) {
|
|
||||||
throw new SalaryRunTimeException("请进行缴款后再刷新缴款状态");
|
|
||||||
}
|
|
||||||
taxDeclareRecord.setTaxDeclareStatus(TaxDeclareStatusEnum.DECLARE_SUCCESS_PAID.getValue());
|
|
||||||
taxDeclareRecord.setTaxPaidAmount(totalPaid.toString());
|
|
||||||
taxDeclareRecord.setTaxPurePaidAmount(taxPurePaidAmount.add(taxPayAmount).toString());
|
|
||||||
taxDeclareRecord.setTaxPayAmount(BigDecimal.ZERO.toString());
|
|
||||||
taxDeclareRecord.setUpdateTime(new Date());
|
|
||||||
getTaxDeclareRecordService(user).updateById(taxDeclareRecord);
|
|
||||||
// 填充回去后续返回数据用
|
|
||||||
taxDeclareRecord.setTaxPayAmount(taxPayAmount.toString());
|
|
||||||
return taxDeclareRecord;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void cancelWithholdingVoucher(TaxDeclarationApiConfigPO apiConfig, TaxDeclareRecordPO taxDeclareRecord, Map<String, Object> requestParam) {
|
public void cancelWithholdingVoucher(TaxDeclarationApiConfigPO apiConfig, TaxDeclareRecordPO taxDeclareRecord, Map<String, Object> requestParam) {
|
||||||
|
|
|
||||||
|
|
@ -254,7 +254,11 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction
|
||||||
String imageId = Util.null2String(importParam.getImageId());
|
String imageId = Util.null2String(importParam.getImageId());
|
||||||
Validate.notBlank(imageId, "imageId为空");
|
Validate.notBlank(imageId, "imageId为空");
|
||||||
// 获取所有个税扣缴义务人
|
// 获取所有个税扣缴义务人
|
||||||
Collection<TaxAgentManageRangeEmployeeDTO> taxAgentList = getTaxAgentService(user).listTaxAgentAndEmployeeTree(currentEmployeeId);
|
// 获取所有个税扣缴义务人
|
||||||
|
TaxAgentQueryParam param = TaxAgentQueryParam.builder().build();
|
||||||
|
param.setFilterType(AuthFilterTypeEnum.ADMIN_DATA);
|
||||||
|
Collection<TaxAgentPO> taxAgentList = getTaxAgentService(user).listAuth(param);
|
||||||
|
// Collection<TaxAgentManageRangeEmployeeDTO> taxAgentList = getTaxAgentService(user).listTaxAgentAndEmployeeTree(currentEmployeeId);
|
||||||
//个税扣缴义务人
|
//个税扣缴义务人
|
||||||
String taxAgentId = Util.null2String(importParam.getTaxAgentId());
|
String taxAgentId = Util.null2String(importParam.getTaxAgentId());
|
||||||
// 获取租户下所有的人员
|
// 获取租户下所有的人员
|
||||||
|
|
@ -356,17 +360,17 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction
|
||||||
errorData.add(errorMessageMap);
|
errorData.add(errorMessageMap);
|
||||||
errorSum += 1;
|
errorSum += 1;
|
||||||
} else {
|
} else {
|
||||||
Optional<TaxAgentManageRangeEmployeeDTO> optionalTemp = taxAgentList.stream().filter(m -> m.getTaxAgentName().equals(taxAgentName)).findFirst();
|
Optional<TaxAgentPO> optionalTemp = taxAgentList.stream().filter(m -> m.getName().equals(taxAgentName)).findFirst();
|
||||||
if (optionalTemp.isPresent()) {
|
if (optionalTemp.isPresent()) {
|
||||||
if (StringUtils.isNotEmpty(taxAgentId) && !optionalTemp.get().getTaxAgentId().equals(Long.valueOf(taxAgentId))) {
|
if (StringUtils.isNotEmpty(taxAgentId) && !optionalTemp.get().getId().equals(Long.valueOf(taxAgentId))) {
|
||||||
//个税扣缴义务人与导入时选择的不一致
|
//个税扣缴义务人与导入时选择的不一致
|
||||||
Map<String, String> errorMessageMap = Maps.newHashMap();
|
Map<String, String> errorMessageMap = Maps.newHashMap();
|
||||||
errorMessageMap.put("message", rowIndex + "个税扣缴义务人与导入时选择的不一致");
|
errorMessageMap.put("message", rowIndex + "个税扣缴义务人与导入时选择的不一致");
|
||||||
errorData.add(errorMessageMap);
|
errorData.add(errorMessageMap);
|
||||||
errorSum += 1;
|
errorSum += 1;
|
||||||
} else {
|
} else {
|
||||||
addUpDeduction.setTaxAgentId(optionalTemp.get().getTaxAgentId());
|
addUpDeduction.setTaxAgentId(optionalTemp.get().getId());
|
||||||
taxAgentEmployees = optionalTemp.get().getEmployeeList();
|
// taxAgentEmployees = optionalTemp.get().getEmployeeList();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
//个税扣缴义务人不存在
|
//个税扣缴义务人不存在
|
||||||
|
|
|
||||||
|
|
@ -308,7 +308,7 @@ public class AttendQuoteDataServiceImpl extends Service implements AttendQuoteDa
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
|
|
||||||
effectiveFields.forEach(attendQuoteField -> {
|
effectiveFields.forEach(attendQuoteField -> {
|
||||||
header.add(attendQuoteField.getFieldName());
|
header.add(Util.formatMultiLang(attendQuoteField.getFieldName(), String.valueOf(user.getLanguage())));
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
@ -771,7 +771,7 @@ public class AttendQuoteDataServiceImpl extends Service implements AttendQuoteDa
|
||||||
header.add(SalaryI18nUtil.getI18nLabel(86317, "证件号码"));
|
header.add(SalaryI18nUtil.getI18nLabel(86317, "证件号码"));
|
||||||
// 动态列
|
// 动态列
|
||||||
for (AttendQuoteFieldPO attendQuoteField : attendQuoteFields) {
|
for (AttendQuoteFieldPO attendQuoteField : attendQuoteFields) {
|
||||||
header.add(attendQuoteField.getFieldName());
|
header.add(Util.formatMultiLang(attendQuoteField.getFieldName(), String.valueOf(user.getLanguage())));
|
||||||
}
|
}
|
||||||
List<List<Object>> rows = new ArrayList<>();
|
List<List<Object>> rows = new ArrayList<>();
|
||||||
rows.add(header);
|
rows.add(header);
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,7 @@ import com.google.common.collect.Lists;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.commons.collections4.CollectionUtils;
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
|
import weaver.general.Util;
|
||||||
import weaver.hrm.User;
|
import weaver.hrm.User;
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
@ -292,7 +293,7 @@ public class AttendQuoteFieldServiceImpl extends Service implements AttendQuoteF
|
||||||
Map<String, String> column = columnsOptional.get();
|
Map<String, String> column = columnsOptional.get();
|
||||||
updates.add(AttendQuoteFieldPO.builder()
|
updates.add(AttendQuoteFieldPO.builder()
|
||||||
.code(column.get("code"))
|
.code(column.get("code"))
|
||||||
.fieldName(column.get("name"))
|
.fieldName(Util.formatMultiLang(column.get("name"), String.valueOf(user.getLanguage())))
|
||||||
.updateTime(now)
|
.updateTime(now)
|
||||||
.build());
|
.build());
|
||||||
}
|
}
|
||||||
|
|
@ -312,7 +313,7 @@ public class AttendQuoteFieldServiceImpl extends Service implements AttendQuoteF
|
||||||
Optional<Map<String, String>> columnsOptional = columns.stream().filter(column -> code.equals(column.get("code"))).findFirst();
|
Optional<Map<String, String>> columnsOptional = columns.stream().filter(column -> code.equals(column.get("code"))).findFirst();
|
||||||
if (columnsOptional.isPresent()) {
|
if (columnsOptional.isPresent()) {
|
||||||
Map<String, String> column = columnsOptional.get();
|
Map<String, String> column = columnsOptional.get();
|
||||||
saves.add(buildAttendQuoteField(column.get("code"), column.get("name")));
|
saves.add(buildAttendQuoteField(column.get("code"), Util.formatMultiLang(column.get("name"), String.valueOf(user.getLanguage()))));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (CollectionUtils.isNotEmpty(saves)) {
|
if (CollectionUtils.isNotEmpty(saves)) {
|
||||||
|
|
|
||||||
|
|
@ -36,6 +36,7 @@ import org.apache.commons.collections4.MapUtils;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
import weaver.general.Util;
|
||||||
import weaver.hrm.User;
|
import weaver.hrm.User;
|
||||||
|
|
||||||
import java.lang.reflect.Field;
|
import java.lang.reflect.Field;
|
||||||
|
|
@ -483,7 +484,7 @@ public class RemoteExcelServiceImpl extends Service implements RemoteExcelServic
|
||||||
List<FormulaVar> formulaVars = fields.stream().map(e -> {
|
List<FormulaVar> formulaVars = fields.stream().map(e -> {
|
||||||
FormulaVar formulaVar = new FormulaVar();
|
FormulaVar formulaVar = new FormulaVar();
|
||||||
formulaVar.setFieldId(referenceEnum.getValue() + SalaryFormulaFieldConstant.FIELD_ID_SEPARATOR + e.getId());
|
formulaVar.setFieldId(referenceEnum.getValue() + SalaryFormulaFieldConstant.FIELD_ID_SEPARATOR + e.getId());
|
||||||
formulaVar.setName(e.getFieldName());
|
formulaVar.setName(Util.formatMultiLang(e.getFieldName(), String.valueOf(user.getLanguage())));
|
||||||
formulaVar.setSource("" + referenceEnum.getValue());
|
formulaVar.setSource("" + referenceEnum.getValue());
|
||||||
formulaVar.setFieldType(DataType.NUMBER);
|
formulaVar.setFieldType(DataType.NUMBER);
|
||||||
return formulaVar;
|
return formulaVar;
|
||||||
|
|
|
||||||
|
|
@ -7141,6 +7141,55 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
|
||||||
Util_DataCache.setObjVal(cacheKey, JsonUtil.toJsonString(welfareNames));
|
Util_DataCache.setObjVal(cacheKey, JsonUtil.toJsonString(welfareNames));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void batSave(AccountBatParam accountBatParam) {
|
||||||
|
List<Long> paymentOrganizations = accountBatParam.getPaymentOrganizations();
|
||||||
|
for (Long paymentOrganization : paymentOrganizations) {
|
||||||
|
AccountParam param = AccountParam.builder()
|
||||||
|
.billMonth(accountBatParam.getBillMonth())
|
||||||
|
.paymentOrganization(paymentOrganization)
|
||||||
|
.flag(true)
|
||||||
|
.remarks(accountBatParam.getRemarks())
|
||||||
|
.build();
|
||||||
|
save(param);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void batDelete(AccountBatParam batParam) {
|
||||||
|
List<Long> ids = batParam.getIds();
|
||||||
|
for (Long id : ids) {
|
||||||
|
InsuranceAccountBatchPO po = getInsuranceAccountBatchMapper().getById(id);
|
||||||
|
AccountParam param = AccountParam.builder()
|
||||||
|
.billMonth(po.getBillMonth())
|
||||||
|
.paymentOrganization(po.getPaymentOrganization())
|
||||||
|
.build();
|
||||||
|
delete(param);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void batFile(AccountBatParam batParam) {
|
||||||
|
List<Long> ids = batParam.getIds();
|
||||||
|
for (Long id : ids) {
|
||||||
|
InsuranceAccountBatchPO po = getInsuranceAccountBatchMapper().getById(id);
|
||||||
|
AccountParam param = AccountParam.builder()
|
||||||
|
.billMonth(po.getBillMonth())
|
||||||
|
.paymentOrganization(po.getPaymentOrganization())
|
||||||
|
.build();
|
||||||
|
file(param);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void batSocialSecurityBenefitsRecalculate(AccountBatParam batParam) {
|
||||||
|
List<Long> ids = batParam.getIds();
|
||||||
|
for (Long id : ids) {
|
||||||
|
InsuranceAccountBatchPO param = InsuranceAccountBatchPO.builder().id(id).build();
|
||||||
|
socialSecurityBenefitsRecalculate(param);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void accountOtherView(InsuranceAccountViewListDTO dto, List<InsuranceAccountDetailPO> pos) {
|
public void accountOtherView(InsuranceAccountViewListDTO dto, List<InsuranceAccountDetailPO> pos) {
|
||||||
int otherNum = 0;
|
int otherNum = 0;
|
||||||
BigDecimal otherPaySum = new BigDecimal("0");
|
BigDecimal otherPaySum = new BigDecimal("0");
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
package com.engine.salary.service.impl;
|
package com.engine.salary.service.impl;
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSON;
|
import com.alibaba.fastjson.JSON;
|
||||||
import com.alipay.oceanbase.jdbc.StringUtils;
|
|
||||||
import com.cloudstore.eccom.pc.table.WeaTable;
|
import com.cloudstore.eccom.pc.table.WeaTable;
|
||||||
import com.cloudstore.eccom.pc.table.WeaTableColumn;
|
import com.cloudstore.eccom.pc.table.WeaTableColumn;
|
||||||
import com.engine.common.util.ServiceUtil;
|
import com.engine.common.util.ServiceUtil;
|
||||||
|
|
@ -41,6 +40,7 @@ import com.engine.salary.util.db.MapperProxyFactory;
|
||||||
import com.engine.salary.util.page.Column;
|
import com.engine.salary.util.page.Column;
|
||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
import com.engine.salary.util.db.IdGenerator;
|
import com.engine.salary.util.db.IdGenerator;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
import weaver.hrm.User;
|
import weaver.hrm.User;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -405,11 +405,13 @@ public class SalaryAcctExcelServiceImpl extends Service implements SalaryAcctExc
|
||||||
if (openSum != null && StringUtils.isNotBlank(openSum.getConfValue()) && OpenEnum.parseByValue(openSum.getConfValue()) == OpenEnum.OPEN) {
|
if (openSum != null && StringUtils.isNotBlank(openSum.getConfValue()) && OpenEnum.parseByValue(openSum.getConfValue()) == OpenEnum.OPEN) {
|
||||||
total = true;
|
total = true;
|
||||||
Map<String, Object> sumRow = getSalaryAcctResultService(user).sumRow(queryParam);
|
Map<String, Object> sumRow = getSalaryAcctResultService(user).sumRow(queryParam);
|
||||||
sumRow.forEach((k, v) -> {
|
if (sumRow != null) {
|
||||||
if (NumberUtils.isCreatable(v.toString())) {
|
sumRow.forEach((k, v) -> {
|
||||||
sumRow.put(k, new BigDecimal(v.toString()));
|
if (NumberUtils.isCreatable(v.toString())) {
|
||||||
}
|
sumRow.put(k, new BigDecimal(v.toString()));
|
||||||
});
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
if (sumRow != null) {
|
if (sumRow != null) {
|
||||||
sumRow.put("taxAgentName", "总计");
|
sumRow.put("taxAgentName", "总计");
|
||||||
resultMapList.add(sumRow);
|
resultMapList.add(sumRow);
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@ import com.engine.salary.config.SalaryElogConfig;
|
||||||
import com.engine.salary.entity.salaryBill.po.SalarySendPO;
|
import com.engine.salary.entity.salaryBill.po.SalarySendPO;
|
||||||
import com.engine.salary.entity.salaryacct.bo.SalaryAcctRecordBO;
|
import com.engine.salary.entity.salaryacct.bo.SalaryAcctRecordBO;
|
||||||
import com.engine.salary.entity.salaryacct.param.AbnormalEmployeeListQueryParam;
|
import com.engine.salary.entity.salaryacct.param.AbnormalEmployeeListQueryParam;
|
||||||
|
import com.engine.salary.entity.salaryacct.param.SalaryAcctBatParam;
|
||||||
import com.engine.salary.entity.salaryacct.param.SalaryAcctRecordQueryParam;
|
import com.engine.salary.entity.salaryacct.param.SalaryAcctRecordQueryParam;
|
||||||
import com.engine.salary.entity.salaryacct.param.SalaryAcctRecordSaveParam;
|
import com.engine.salary.entity.salaryacct.param.SalaryAcctRecordSaveParam;
|
||||||
import com.engine.salary.entity.salaryacct.po.SalaryAcctEmployeePO;
|
import com.engine.salary.entity.salaryacct.po.SalaryAcctEmployeePO;
|
||||||
|
|
@ -50,6 +51,7 @@ import org.apache.commons.lang3.StringUtils;
|
||||||
import org.apache.commons.lang3.math.NumberUtils;
|
import org.apache.commons.lang3.math.NumberUtils;
|
||||||
import weaver.hrm.User;
|
import weaver.hrm.User;
|
||||||
|
|
||||||
|
import java.time.YearMonth;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
|
@ -1005,4 +1007,38 @@ public class SalaryAcctRecordServiceImpl extends Service implements SalaryAcctRe
|
||||||
public void updateDate(Long id, Date updateTime) {
|
public void updateDate(Long id, Date updateTime) {
|
||||||
getSalaryAcctRecordMapper().updateDate(id, updateTime);
|
getSalaryAcctRecordMapper().updateDate(id, updateTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void batSave(SalaryAcctBatParam saveParam) {
|
||||||
|
|
||||||
|
List<Long> salarySobIds = saveParam.getSalarySobIds();
|
||||||
|
YearMonth salaryMonth = SalaryDateUtil.localDate2YearMonth(saveParam.getSalaryMonth());
|
||||||
|
for (int i = 0; i < salarySobIds.size(); i++) {
|
||||||
|
Long salarySobId = salarySobIds.get(i);
|
||||||
|
SalaryAcctRecordSaveParam param = SalaryAcctRecordSaveParam.builder()
|
||||||
|
.salarySobId(salarySobId)
|
||||||
|
.salaryMonth(salaryMonth)
|
||||||
|
.description(saveParam.getDescription())
|
||||||
|
.build();
|
||||||
|
save(param);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void batFile(SalaryAcctBatParam param) {
|
||||||
|
List<Long> salaryAcctRecordIds = param.getSalaryAcctRecordIds();
|
||||||
|
for (int i = 0; i < salaryAcctRecordIds.size(); i++) {
|
||||||
|
Long recordId = salaryAcctRecordIds.get(i);
|
||||||
|
file(recordId);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void batReCalculate(SalaryAcctBatParam param) {
|
||||||
|
List<Long> salaryAcctRecordIds = param.getSalaryAcctRecordIds();
|
||||||
|
for (int i = 0; i < salaryAcctRecordIds.size(); i++) {
|
||||||
|
Long recordId = salaryAcctRecordIds.get(i);
|
||||||
|
reCalculate(recordId);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
package com.engine.salary.service.impl;
|
package com.engine.salary.service.impl;
|
||||||
|
|
||||||
import cn.hutool.core.collection.CollUtil;
|
import cn.hutool.core.collection.CollUtil;
|
||||||
import cn.hutool.core.lang.Validator;
|
|
||||||
import com.alibaba.fastjson.JSON;
|
import com.alibaba.fastjson.JSON;
|
||||||
import com.alibaba.fastjson.JSONArray;
|
import com.alibaba.fastjson.JSONArray;
|
||||||
import com.api.formmode.mybatis.util.SqlProxyHandle;
|
import com.api.formmode.mybatis.util.SqlProxyHandle;
|
||||||
|
|
@ -1752,9 +1751,6 @@ public class SalarySendServiceImpl extends Service implements SalarySendService
|
||||||
}
|
}
|
||||||
|
|
||||||
String mobile = employee.getMobile();
|
String mobile = employee.getMobile();
|
||||||
if (Validator.isMobile(mobile)) {
|
|
||||||
throw new SalaryRunTimeException("手机号信息有误");
|
|
||||||
}
|
|
||||||
|
|
||||||
boolean checkSendSMS = MessageUtil.checkSendSMS();
|
boolean checkSendSMS = MessageUtil.checkSendSMS();
|
||||||
if (!checkSendSMS) {
|
if (!checkSendSMS) {
|
||||||
|
|
@ -1782,6 +1778,9 @@ public class SalarySendServiceImpl extends Service implements SalarySendService
|
||||||
|
|
||||||
//取出验证码
|
//取出验证码
|
||||||
String cacheValue = getSalaryCacheService(user).get(SALARY_CACHE_SMS_CODE + "_" + id);
|
String cacheValue = getSalaryCacheService(user).get(SALARY_CACHE_SMS_CODE + "_" + id);
|
||||||
|
if (cacheValue == null) {
|
||||||
|
throw new SalaryRunTimeException("未获取到验证码,请重新发送");
|
||||||
|
}
|
||||||
String[] cache = cacheValue.split("_");
|
String[] cache = cacheValue.split("_");
|
||||||
String code = cache[0];
|
String code = cache[0];
|
||||||
//失效时间
|
//失效时间
|
||||||
|
|
|
||||||
|
|
@ -254,6 +254,9 @@ public class SalarySobServiceImpl extends Service implements SalarySobService {
|
||||||
}
|
}
|
||||||
|
|
||||||
List<SalarySobPO> list = getSalarySobMapper().listSome(build);
|
List<SalarySobPO> list = getSalarySobMapper().listSome(build);
|
||||||
|
if (param.isShare() == true) {
|
||||||
|
return list;
|
||||||
|
}
|
||||||
return getAuthService(user).auth(list, param.getFilterType(), SalarySobPO.class);
|
return getAuthService(user).auth(list, param.getFilterType(), SalarySobPO.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -471,15 +471,20 @@ public class SpecialAddDeductionServiceImpl extends Service implements SpecialAd
|
||||||
SpecialAddDeductionBiz SpecialAddDeductionBiz = new SpecialAddDeductionBiz();
|
SpecialAddDeductionBiz SpecialAddDeductionBiz = new SpecialAddDeductionBiz();
|
||||||
Long currentEmployeeId = (long) user.getUID();
|
Long currentEmployeeId = (long) user.getUID();
|
||||||
// 获取所有个税扣缴义务人
|
// 获取所有个税扣缴义务人
|
||||||
Collection<TaxAgentManageRangeEmployeeDTO> taxAgentList =
|
// Collection<TaxAgentManageRangeEmployeeDTO> taxAgentList =
|
||||||
getTaxAgentService(user).listTaxAgentAndEmployeeTree(currentEmployeeId);
|
// getTaxAgentService(user).listTaxAgentAndEmployeeTree(currentEmployeeId);
|
||||||
|
|
||||||
|
TaxAgentQueryParam param = TaxAgentQueryParam.builder().build();
|
||||||
|
param.setFilterType(AuthFilterTypeEnum.ADMIN_DATA);
|
||||||
|
Collection<TaxAgentPO> taxAgentList = getTaxAgentService(user).listAuth(param);
|
||||||
|
|
||||||
SpecialAddDeductionPO byId = SpecialAddDeductionBiz.getById(specialAddDeductionParam.getId());
|
SpecialAddDeductionPO byId = SpecialAddDeductionBiz.getById(specialAddDeductionParam.getId());
|
||||||
if (byId == null) {
|
if (byId == null) {
|
||||||
throw new SalaryRunTimeException("该数据不存在!");
|
throw new SalaryRunTimeException("该数据不存在!");
|
||||||
}
|
}
|
||||||
//管理员可以编辑该扣缴义务人数据,其他人可以编辑本人数据
|
//管理员可以编辑该扣缴义务人数据,其他人可以编辑本人数据
|
||||||
boolean canEdit = byId.getEmployeeId().equals((long) user.getUID())
|
boolean canEdit = byId.getEmployeeId().equals((long) user.getUID())
|
||||||
|| taxAgentList.stream().anyMatch(t -> Objects.equals(t.getTaxAgentId(), byId.getTaxAgentId()));
|
|| taxAgentList.stream().anyMatch(t -> Objects.equals(t.getId(), byId.getTaxAgentId()));
|
||||||
if (!canEdit) {
|
if (!canEdit) {
|
||||||
//没有编辑权限
|
//没有编辑权限
|
||||||
throw new SalaryRunTimeException("该个税扣缴义务人无权限编辑此数据!");
|
throw new SalaryRunTimeException("该个税扣缴义务人无权限编辑此数据!");
|
||||||
|
|
|
||||||
|
|
@ -291,6 +291,9 @@ public class TaxAgentServiceImpl extends Service implements TaxAgentService {
|
||||||
public List<TaxAgentPO> listAuth(TaxAgentQueryParam queryParam) {
|
public List<TaxAgentPO> listAuth(TaxAgentQueryParam queryParam) {
|
||||||
List<TaxAgentPO> taxAgents = getTaxAgentMapper().listBySome(queryParam);
|
List<TaxAgentPO> taxAgents = getTaxAgentMapper().listBySome(queryParam);
|
||||||
AuthFilterTypeEnum filterType = queryParam.getFilterType();
|
AuthFilterTypeEnum filterType = queryParam.getFilterType();
|
||||||
|
if (queryParam.isShare()) {
|
||||||
|
return taxAgents;
|
||||||
|
}
|
||||||
return getAuthService(user).auth(taxAgents, filterType, TaxAgentPO.class);
|
return getAuthService(user).auth(taxAgents, filterType, TaxAgentPO.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -586,7 +589,7 @@ public class TaxAgentServiceImpl extends Service implements TaxAgentService {
|
||||||
public List<Map<String, Object>> selectList(boolean needAuth) {
|
public List<Map<String, Object>> selectList(boolean needAuth) {
|
||||||
List<TaxAgentPO> taxAgents = getTaxAgentMapper().listAll();
|
List<TaxAgentPO> taxAgents = getTaxAgentMapper().listAll();
|
||||||
if (needAuth) {
|
if (needAuth) {
|
||||||
taxAgents = handleForDevolution(taxAgents, (long) user.getUID(), true);
|
taxAgents = getAuthService(user).auth(taxAgents, AuthFilterTypeEnum.QUERY_DATA, TaxAgentPO.class);
|
||||||
}
|
}
|
||||||
return taxAgents.stream().map(m -> {
|
return taxAgents.stream().map(m -> {
|
||||||
Map<String, Object> map = new HashMap<>(2);
|
Map<String, Object> map = new HashMap<>(2);
|
||||||
|
|
|
||||||
|
|
@ -48,6 +48,7 @@ import com.engine.salary.enums.sicategory.DeleteTypeEnum;
|
||||||
import com.engine.salary.enums.taxagent.TaxAgentTaxReturnStatusEnum;
|
import com.engine.salary.enums.taxagent.TaxAgentTaxReturnStatusEnum;
|
||||||
import com.engine.salary.enums.taxdeclaration.*;
|
import com.engine.salary.enums.taxdeclaration.*;
|
||||||
import com.engine.salary.exception.SalaryRunTimeException;
|
import com.engine.salary.exception.SalaryRunTimeException;
|
||||||
|
import com.engine.salary.mapper.salaryacct.SalaryAcctRecordMapper;
|
||||||
import com.engine.salary.mapper.taxdeclaration.TaxDeclareRecordMapper;
|
import com.engine.salary.mapper.taxdeclaration.TaxDeclareRecordMapper;
|
||||||
import com.engine.salary.mapper.taxdeclaration.TaxDeclareStatusMapper;
|
import com.engine.salary.mapper.taxdeclaration.TaxDeclareStatusMapper;
|
||||||
import com.engine.salary.remote.tax.client.DeclareClient;
|
import com.engine.salary.remote.tax.client.DeclareClient;
|
||||||
|
|
@ -55,6 +56,8 @@ import com.engine.salary.remote.tax.response.declare.GetCompanyIncomesResponse;
|
||||||
import com.engine.salary.remote.tax.response.declare.GetDeclareTaxResultFeedbackResponse;
|
import com.engine.salary.remote.tax.response.declare.GetDeclareTaxResultFeedbackResponse;
|
||||||
import com.engine.salary.service.*;
|
import com.engine.salary.service.*;
|
||||||
import com.engine.salary.service.factory.TaxPaymentServiceFactory;
|
import com.engine.salary.service.factory.TaxPaymentServiceFactory;
|
||||||
|
import com.engine.salary.sys.service.SalarySysConfService;
|
||||||
|
import com.engine.salary.sys.service.impl.SalarySysConfServiceImpl;
|
||||||
import com.engine.salary.util.*;
|
import com.engine.salary.util.*;
|
||||||
import com.engine.salary.util.db.IdGenerator;
|
import com.engine.salary.util.db.IdGenerator;
|
||||||
import com.engine.salary.util.db.MapperProxyFactory;
|
import com.engine.salary.util.db.MapperProxyFactory;
|
||||||
|
|
@ -77,6 +80,7 @@ import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
import static com.engine.salary.enums.taxdeclaration.TaxDeclareStatusEnum.NOT_DECLARE;
|
import static com.engine.salary.enums.taxdeclaration.TaxDeclareStatusEnum.NOT_DECLARE;
|
||||||
|
import static com.engine.salary.sys.constant.SalarySysConstant.TAX_DECLARATION_DATE_TYPE;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 个税申报
|
* 个税申报
|
||||||
|
|
@ -182,9 +186,20 @@ public class TaxDeclareRecordServiceImpl extends Service implements TaxDeclareRe
|
||||||
return ServiceUtil.getService(OtherDeductionServiceImpl.class, user);
|
return ServiceUtil.getService(OtherDeductionServiceImpl.class, user);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private SalaryAcctRecordMapper getSalaryAcctRecordMapper() {
|
||||||
|
return MapperProxyFactory.getProxy(SalaryAcctRecordMapper.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
private TaxPaymentServiceFactory taxPaymentServiceFactory = new TaxPaymentServiceFactory(user);
|
private TaxPaymentServiceFactory taxPaymentServiceFactory = new TaxPaymentServiceFactory(user);
|
||||||
|
|
||||||
|
private SalarySysConfService getSalarySysConfService(User user) {
|
||||||
|
return ServiceUtil.getService(SalarySysConfServiceImpl.class, user);
|
||||||
|
}
|
||||||
|
|
||||||
|
//是否根据税款所属期进行申报
|
||||||
|
private final boolean isTaxDeclarationByTaxCycle = "1".equals(getSalarySysConfService(user).getValueByCode(TAX_DECLARATION_DATE_TYPE));
|
||||||
|
|
||||||
|
|
||||||
// private TaxPaymentRequestMapper taxPaymentRequestMapper;
|
// private TaxPaymentRequestMapper taxPaymentRequestMapper;
|
||||||
|
|
||||||
|
|
@ -274,9 +289,44 @@ public class TaxDeclareRecordServiceImpl extends Service implements TaxDeclareRe
|
||||||
// 根据个税扣缴义务人范围查询个税扣缴义务人
|
// 根据个税扣缴义务人范围查询个税扣缴义务人
|
||||||
Collection<TaxAgentPO> taxAgents = queryByTaxAgentRange(saveParam);
|
Collection<TaxAgentPO> taxAgents = queryByTaxAgentRange(saveParam);
|
||||||
Map<Long, String> taxAgentNameMap = SalaryEntityUtil.convert2Map(taxAgents, TaxAgentPO::getId, TaxAgentPO::getName);
|
Map<Long, String> taxAgentNameMap = SalaryEntityUtil.convert2Map(taxAgents, TaxAgentPO::getId, TaxAgentPO::getName);
|
||||||
|
|
||||||
|
Date taxCycle;
|
||||||
|
List<SalaryAcctRecordPO> salaryAcctRecords = new ArrayList<>();
|
||||||
|
//根据税款所属期申报
|
||||||
|
if (isTaxDeclarationByTaxCycle) {
|
||||||
|
taxCycle = saveParam.getTaxCycle();
|
||||||
|
if (Objects.isNull(taxCycle)) {
|
||||||
|
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(84026, "税款所属期参数错误"));
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询薪资所属月的薪资核算记录
|
||||||
|
salaryAcctRecords = listByTaxCycle(SalaryAcctRecordPO.builder().taxCycle(taxCycle).build());
|
||||||
|
// 无薪资核算记录,不允许生成个税申报表
|
||||||
|
if (CollectionUtils.isEmpty(salaryAcctRecords)) {
|
||||||
|
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(98874, "{0}无申报数据").replace("{0}", SalaryDateUtil.getFormatYearMonth(taxCycle)));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
//根据薪资所属月申报
|
||||||
|
// 薪资所属月的日期范围
|
||||||
|
LocalDateRange salaryMonthDateRange = SalaryDateUtil.localDate2Range(saveParam.getSalaryMonth());
|
||||||
|
if (Objects.isNull(salaryMonthDateRange)) {
|
||||||
|
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(84026, "薪资所属月参数错误"));
|
||||||
|
}
|
||||||
|
// 查询薪资所属月的薪资核算记录
|
||||||
|
salaryAcctRecords = listBySalaryMonth(SalaryAcctRecordPO.builder().salaryMonths(salaryMonthDateRange).build());
|
||||||
|
// 如果当前薪资所属月下存在不同的税款所属期,属于异常业务场景,不允许生成个税申报表
|
||||||
|
taxCycle = salaryAcctRecords.get(0).getTaxCycle();
|
||||||
|
boolean differentTaxCycle = salaryAcctRecords.stream().anyMatch(salaryAcctRecordPO -> salaryAcctRecordPO.getTaxCycle().compareTo(taxCycle) != 0);
|
||||||
|
if (differentTaxCycle) {
|
||||||
|
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(98876, "{0}存在不同的税款所属期,无法正常生成个税申报表,请调整账套设置,重新核算后再生成个税申报表")
|
||||||
|
.replace("{0}", SalaryDateUtil.getFormatYearMonth(saveParam.getSalaryMonth())));
|
||||||
|
}
|
||||||
|
}
|
||||||
// 查询薪资所属月下的薪资核算记录,并按照权限过滤
|
// 查询薪资所属月下的薪资核算记录,并按照权限过滤
|
||||||
LocalDateRange salaryMonthRange = new LocalDateRange().setFromDate(saveParam.getSalaryMonth()).setEndDate(saveParam.getSalaryMonth());
|
// LocalDateRange salaryMonthRange = new LocalDateRange().setFromDate(saveParam.getSalaryMonth()).setEndDate(saveParam.getSalaryMonth());
|
||||||
List<SalaryAcctRecordPO> salaryAcctRecords = getSalaryAcctRecordService(user).listBySalaryMonth(salaryMonthRange);
|
// List<SalaryAcctRecordPO> salaryAcctRecords = getSalaryAcctRecordService(user).listBySalaryMonth(salaryMonthRange);
|
||||||
|
|
||||||
|
|
||||||
// 查询薪资核算记录关联的个税扣缴义务人
|
// 查询薪资核算记录关联的个税扣缴义务人
|
||||||
List<SalaryAcctTaxAgentPO> salaryAcctTaxAgents = getSalaryAcctRecordService(user).listBySalaryAcctRecordIds(SalaryEntityUtil.properties(salaryAcctRecords, SalaryAcctRecordPO::getId));
|
List<SalaryAcctTaxAgentPO> salaryAcctTaxAgents = getSalaryAcctRecordService(user).listBySalaryAcctRecordIds(SalaryEntityUtil.properties(salaryAcctRecords, SalaryAcctRecordPO::getId));
|
||||||
// 按照saveParam中的个税扣缴义务人范围过滤
|
// 按照saveParam中的个税扣缴义务人范围过滤
|
||||||
|
|
@ -362,6 +412,14 @@ public class TaxDeclareRecordServiceImpl extends Service implements TaxDeclareRe
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<SalaryAcctRecordPO> listBySalaryMonth(SalaryAcctRecordPO po) {
|
||||||
|
return getSalaryAcctRecordMapper().listSome(po);
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<SalaryAcctRecordPO> listByTaxCycle(SalaryAcctRecordPO po) {
|
||||||
|
return getSalaryAcctRecordMapper().listSome(po);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void refreshData(Long id) {
|
public void refreshData(Long id) {
|
||||||
// 查询个税申报记录
|
// 查询个税申报记录
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,6 @@ import com.engine.salary.entity.taxdeclaration.po.TaxDeclarationApiConfigPO;
|
||||||
import com.engine.salary.entity.taxdeclaration.po.TaxDeclareRecordPO;
|
import com.engine.salary.entity.taxdeclaration.po.TaxDeclareRecordPO;
|
||||||
import com.engine.salary.entity.taxdeclaration.po.TaxDeclareStatusPO;
|
import com.engine.salary.entity.taxdeclaration.po.TaxDeclareStatusPO;
|
||||||
import com.engine.salary.entity.taxpayment.dto.TaxAgreementFeedbackResultDTO;
|
import com.engine.salary.entity.taxpayment.dto.TaxAgreementFeedbackResultDTO;
|
||||||
import com.engine.salary.entity.taxpayment.dto.TaxAmountFormDTO;
|
|
||||||
import com.engine.salary.entity.taxpayment.dto.TaxFeedbackResultDTO;
|
import com.engine.salary.entity.taxpayment.dto.TaxFeedbackResultDTO;
|
||||||
import com.engine.salary.entity.taxpayment.param.TaxPaymentQueryParam;
|
import com.engine.salary.entity.taxpayment.param.TaxPaymentQueryParam;
|
||||||
import com.engine.salary.entity.taxpayment.response.BaseResponse;
|
import com.engine.salary.entity.taxpayment.response.BaseResponse;
|
||||||
|
|
@ -23,7 +22,6 @@ import com.engine.salary.util.*;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
|
|
@ -55,53 +53,57 @@ public class TaxPaymentWithholdingServiceImpl extends AbstractTaxPaymentService
|
||||||
throw new SalaryRunTimeException(msg);
|
throw new SalaryRunTimeException(msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
List<TaxDeclareStatusPO> statuses = getTaxDeclareStatusService(user).getTaxDeclareStatusByTaxDeclareRecordId(param.getTaxDeclareRecordId());
|
TaxDeclareStatusPO status = getTaxDeclareStatusService(user).getTaxDeclareStatus(param.getTaxDeclareRecordId(),param.getReportType());
|
||||||
for (TaxDeclareStatusPO status : statuses) {
|
WithholdingFeedbackResponse.Feedback feedback = Optional.of(feedbackResponse)
|
||||||
WithholdingFeedbackResponse.Feedback feedback = Optional.of(feedbackResponse)
|
.map(WithholdingFeedbackResponse::getBody)
|
||||||
.map(WithholdingFeedbackResponse::getBody)
|
.map(body -> {
|
||||||
.map(body -> {
|
if (Objects.equals(status.getReportType(), DeclareReportTypeEnum.COMPREHENSIVE_INCOME.getValue())) {
|
||||||
if (Objects.equals(status.getReportType(), DeclareReportTypeEnum.COMPREHENSIVE_INCOME.getValue())) {
|
return body.getZhsdjk();
|
||||||
return body.getZhsdjk();
|
} else if (Objects.equals(status.getReportType(), DeclareReportTypeEnum.CLASSIFIED_INCOME.getValue())) {
|
||||||
} else if (Objects.equals(status.getReportType(), DeclareReportTypeEnum.CLASSIFIED_INCOME.getValue())) {
|
return body.getFlsdjk();
|
||||||
return body.getFlsdjk();
|
} else if (Objects.equals(status.getReportType(), DeclareReportTypeEnum.NONRESIDENT_INCOME.getValue())) {
|
||||||
} else if (Objects.equals(status.getReportType(), DeclareReportTypeEnum.NONRESIDENT_INCOME.getValue())) {
|
return body.getFjmsdjk();
|
||||||
return body.getFjmsdjk();
|
} else {
|
||||||
} else {
|
return body.getXsgsdjk();
|
||||||
return body.getXsgsdjk();
|
}
|
||||||
}
|
|
||||||
|
|
||||||
})
|
})
|
||||||
.orElse(null);
|
.orElse(null);
|
||||||
if (feedback == null) {
|
if (feedback == null) {
|
||||||
log.info("getAgreementQueryFeedbackResponse empty data error: {}", JSON.toJSONString(feedbackResponse));
|
// 更新缴款请求为已反馈
|
||||||
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(175338, "税局接口错误,未返回有效数据"));
|
updateTaxPaymentRequest(param);
|
||||||
}
|
log.info("getAgreementQueryFeedbackResponse empty data error: {}", JSON.toJSONString(feedbackResponse));
|
||||||
// 判断缴款状态是否成功
|
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(175338, "税局接口错误,未返回有效数据"));
|
||||||
Integer paymentStatus = SalaryEntityUtil.getIntValue(feedback.getJkzt(), -1);
|
|
||||||
TaxPaymentStatusEnum paymentStatusEnum = SalaryEnumUtil.enumMatchByValue(paymentStatus, TaxPaymentStatusEnum.class);
|
|
||||||
if (paymentStatusEnum != TaxPaymentStatusEnum.SUCCESS) {
|
|
||||||
throw new SalaryRunTimeException(String.format("缴款失败,失败原因:%s,申报状态:%s", feedback.getJksbyy(), feedback.getSbzt()));
|
|
||||||
}
|
|
||||||
// 累计实缴金额
|
|
||||||
BigDecimal totalPaid = feedback.getKkfhlb().stream().map(e -> new BigDecimal(e.getSjse())).reduce(BigDecimal.ZERO, BigDecimal::add);
|
|
||||||
|
|
||||||
if (TaxDeclareStatusEnum.DECLARE_SUCCESS_PAID.getValue().equals(status.getTaxDeclareStatus())) {
|
|
||||||
throw new SalaryRunTimeException("当前申报表状态为已缴款,无法更新状态");
|
|
||||||
}
|
|
||||||
BigDecimal taxPayAmount = SalaryEntityUtil.empty2Zero(status.getTaxPayAmount());
|
|
||||||
BigDecimal taxPurePaidAmount = SalaryEntityUtil.empty2Zero(status.getTaxPurePaidAmount());
|
|
||||||
if (SalaryEntityUtil.empty2Zero(status.getTaxPaidAmount()).equals(totalPaid)
|
|
||||||
&& taxPayAmount.compareTo(BigDecimal.ZERO) > 0) {
|
|
||||||
throw new SalaryRunTimeException("请进行缴款后再刷新缴款状态");
|
|
||||||
}
|
|
||||||
status.setTaxDeclareStatus(TaxDeclareStatusEnum.DECLARE_SUCCESS_PAID.getValue());
|
|
||||||
status.setTaxPaidAmount(totalPaid.toString());
|
|
||||||
status.setTaxPurePaidAmount(taxPurePaidAmount.add(taxPayAmount).toString());
|
|
||||||
status.setTaxPayAmount(BigDecimal.ZERO.toString());
|
|
||||||
getTaxDeclareStatusService(user).updateTaxDeclareStatus(status, false);
|
|
||||||
}
|
}
|
||||||
|
// 判断缴款状态是否成功
|
||||||
|
Integer paymentStatus = SalaryEntityUtil.getIntValue(feedback.getJkzt(), -1);
|
||||||
|
TaxPaymentStatusEnum paymentStatusEnum = SalaryEnumUtil.enumMatchByValue(paymentStatus, TaxPaymentStatusEnum.class);
|
||||||
|
if (paymentStatusEnum != TaxPaymentStatusEnum.SUCCESS) {
|
||||||
|
// 更新缴款请求为已反馈
|
||||||
|
updateTaxPaymentRequest(param);
|
||||||
|
throw new SalaryRunTimeException(String.format("缴款失败,失败原因:%s,申报状态:%s", feedback.getJksbyy(), feedback.getSbzt()));
|
||||||
|
}
|
||||||
|
// 累计实缴金额
|
||||||
|
BigDecimal totalPaid = feedback.getKkfhlb().stream().map(e -> new BigDecimal(e.getSjse())).reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||||
|
|
||||||
|
if (TaxDeclareStatusEnum.DECLARE_SUCCESS_PAID.getValue().equals(status.getTaxDeclareStatus())) {
|
||||||
|
// 更新缴款请求为已反馈
|
||||||
|
updateTaxPaymentRequest(param);
|
||||||
|
throw new SalaryRunTimeException("当前申报表状态为已缴款,无法更新状态");
|
||||||
|
}
|
||||||
|
BigDecimal taxPayAmount = SalaryEntityUtil.empty2Zero(status.getTaxPayAmount());
|
||||||
|
BigDecimal taxPurePaidAmount = SalaryEntityUtil.empty2Zero(status.getTaxPurePaidAmount());
|
||||||
|
if (SalaryEntityUtil.empty2Zero(status.getTaxPaidAmount()).equals(totalPaid) && taxPayAmount.compareTo(BigDecimal.ZERO) > 0) {
|
||||||
|
// 更新缴款请求为已反馈
|
||||||
|
updateTaxPaymentRequest(param);
|
||||||
|
throw new SalaryRunTimeException("请进行缴款后再刷新缴款状态");
|
||||||
|
}
|
||||||
|
status.setTaxDeclareStatus(TaxDeclareStatusEnum.DECLARE_SUCCESS_PAID.getValue());
|
||||||
|
status.setTaxPaidAmount(totalPaid.toString());
|
||||||
|
status.setTaxPurePaidAmount(taxPurePaidAmount.add(taxPayAmount).toString());
|
||||||
|
status.setTaxPayAmount(BigDecimal.ZERO.toString());
|
||||||
|
getTaxDeclareStatusService(user).updateTaxDeclareStatus(status, false);
|
||||||
|
|
||||||
TaxAmountFormDTO taxAmountFormDTO = queryTaxAmount(param);
|
|
||||||
|
|
||||||
//更新主记录
|
//更新主记录
|
||||||
getTaxDeclareStatusService(user).updateRecord(param.getTaxDeclareRecordId());
|
getTaxDeclareStatusService(user).updateRecord(param.getTaxDeclareRecordId());
|
||||||
|
|
@ -112,9 +114,9 @@ public class TaxPaymentWithholdingServiceImpl extends AbstractTaxPaymentService
|
||||||
BigDecimal otherAmount = SalaryEntityUtil.empty2Zero(declareRecordPO.getTaxPaidAmount()).subtract(SalaryEntityUtil.empty2Zero(declareRecordPO.getTaxPurePaidAmount()));
|
BigDecimal otherAmount = SalaryEntityUtil.empty2Zero(declareRecordPO.getTaxPaidAmount()).subtract(SalaryEntityUtil.empty2Zero(declareRecordPO.getTaxPurePaidAmount()));
|
||||||
|
|
||||||
return new TaxAgreementFeedbackResultDTO()
|
return new TaxAgreementFeedbackResultDTO()
|
||||||
.setPayAmount(SalaryEntityUtil.thousandthConvert(SalaryEntityUtil.empty2Zero(declareRecordPO.getTaxPaidAmount()).toString()))
|
.setPayAmount(SalaryEntityUtil.thousandthConvert(SalaryEntityUtil.empty2Zero(status.getTaxPaidAmount()).toString()))
|
||||||
.setOtherAmount(SalaryEntityUtil.thousandthConvert(otherAmount.toString()))
|
.setOtherAmount(SalaryEntityUtil.thousandthConvert(otherAmount.toString()))
|
||||||
.setPersonNum(taxAmountFormDTO.getPersonNum());
|
.setPersonNum(status.getPersonNum().toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
|
|
@ -106,14 +106,6 @@ public class TaxPaymentWithholdingVoucherServiceImpl extends AbstractTaxPaymentS
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void cancelWithholdingVoucher(TaxDeclarationApiConfigPO apiConfig, TaxDeclareRecordPO taxDeclareRecord, Map<String, Object> requestParam) {
|
public void cancelWithholdingVoucher(TaxDeclarationApiConfigPO apiConfig, TaxDeclareRecordPO taxDeclareRecord, Map<String, Object> requestParam) {
|
||||||
TaxPaymentRequestPO paymentRequestPO = getTaxPaymentRequestMapper().getOne(TaxPaymentRequestPO
|
|
||||||
.builder()
|
|
||||||
.requestType(TaxPaymentServiceTypeEnum.WITHHOLDING_VOUCHER.getValue())
|
|
||||||
.taxAgentId(taxDeclareRecord.getTaxAgentId())
|
|
||||||
.taxYearMonth(taxDeclareRecord.getTaxCycle())
|
|
||||||
.build());
|
|
||||||
// if (paymentRequestPO != null) {
|
|
||||||
|
|
||||||
List<TaxDeclareStatusPO> statuses = getTaxDeclareStatusService(user).getTaxDeclareStatusByTaxDeclareRecordId(taxDeclareRecord.getId());
|
List<TaxDeclareStatusPO> statuses = getTaxDeclareStatusService(user).getTaxDeclareStatusByTaxDeclareRecordId(taxDeclareRecord.getId());
|
||||||
TaxPaymentClient taxPaymentClient = new TaxPaymentClient(taxDeclareRecord.getTaxAgentId());
|
TaxPaymentClient taxPaymentClient = new TaxPaymentClient(taxDeclareRecord.getTaxAgentId());
|
||||||
statuses.forEach(status -> {
|
statuses.forEach(status -> {
|
||||||
|
|
@ -128,9 +120,9 @@ public class TaxPaymentWithholdingVoucherServiceImpl extends AbstractTaxPaymentS
|
||||||
.requestType(TaxPaymentServiceTypeEnum.WITHHOLDING_VOUCHER.getValue())
|
.requestType(TaxPaymentServiceTypeEnum.WITHHOLDING_VOUCHER.getValue())
|
||||||
.taxAgentId(taxDeclareRecord.getTaxAgentId())
|
.taxAgentId(taxDeclareRecord.getTaxAgentId())
|
||||||
.taxYearMonth(taxDeclareRecord.getTaxCycle())
|
.taxYearMonth(taxDeclareRecord.getTaxCycle())
|
||||||
|
.reportType(status.getReportType())
|
||||||
.build());
|
.build());
|
||||||
});
|
});
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// @Override
|
// @Override
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@ import com.engine.salary.common.SalaryContext;
|
||||||
import com.engine.salary.exception.ExceptionUtil;
|
import com.engine.salary.exception.ExceptionUtil;
|
||||||
import com.engine.salary.exception.SalaryRunTimeException;
|
import com.engine.salary.exception.SalaryRunTimeException;
|
||||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||||
|
import com.fasterxml.jackson.databind.DeserializationFeature;
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import weaver.general.BaseBean;
|
import weaver.general.BaseBean;
|
||||||
|
|
@ -15,6 +16,7 @@ import weaver.hrm.User;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.io.IOException;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.function.Consumer;
|
import java.util.function.Consumer;
|
||||||
|
|
@ -52,6 +54,17 @@ public class ResponseResult<T, R> {
|
||||||
SalaryContext.get().setValue("response", response);
|
SalaryContext.get().setValue("response", response);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public T parseParams(HttpServletRequest request, Class<T> clazz) {
|
||||||
|
T t = null;
|
||||||
|
try {
|
||||||
|
ObjectMapper mapper = new ObjectMapper();
|
||||||
|
mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
|
||||||
|
t = mapper.readValue(request.getInputStream(), clazz);
|
||||||
|
} catch (IOException e) {
|
||||||
|
log.error("salary api parseParams fail , param {}", t, e);
|
||||||
|
}
|
||||||
|
return t;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 统一返回方法
|
* 统一返回方法
|
||||||
|
|
|
||||||
|
|
@ -217,6 +217,38 @@ public class SIAccountController {
|
||||||
return new ResponseResult<AccountParam, String>(user).run(getService(user)::save, param);
|
return new ResponseResult<AccountParam, String>(user).run(getService(user)::save, param);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@POST
|
||||||
|
@Path("/batSave")
|
||||||
|
@Produces(MediaType.APPLICATION_JSON)
|
||||||
|
public String batSave(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody AccountBatParam param) {
|
||||||
|
User user = HrmUserVarify.getUser(request, response);
|
||||||
|
return new ResponseResult<AccountBatParam, String>(user).run(getService(user)::batSave, param);
|
||||||
|
}
|
||||||
|
|
||||||
|
@POST
|
||||||
|
@Path("/batDelete")
|
||||||
|
@Produces(MediaType.APPLICATION_JSON)
|
||||||
|
public String batDelete(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody AccountBatParam param) {
|
||||||
|
User user = HrmUserVarify.getUser(request, response);
|
||||||
|
return new ResponseResult<AccountBatParam, String>(user).run(getService(user)::batDelete, param);
|
||||||
|
}
|
||||||
|
|
||||||
|
@POST
|
||||||
|
@Path("/batFile")
|
||||||
|
@Produces(MediaType.APPLICATION_JSON)
|
||||||
|
public String batFile(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody AccountBatParam param) {
|
||||||
|
User user = HrmUserVarify.getUser(request, response);
|
||||||
|
return new ResponseResult<AccountBatParam, String>(user).run(getService(user)::batFile, param);
|
||||||
|
}
|
||||||
|
|
||||||
|
@POST
|
||||||
|
@Path("/batSocialSecurityBenefitsRecalculate")
|
||||||
|
@Produces(MediaType.APPLICATION_JSON)
|
||||||
|
public String batSocialSecurityBenefitsRecalculate(@Context HttpServletRequest request, @Context HttpServletResponse response,@RequestBody AccountBatParam batParam ){
|
||||||
|
User user = HrmUserVarify.getUser(request, response);
|
||||||
|
return new ResponseResult<AccountBatParam, String>(user).run(getService(user)::batSocialSecurityBenefitsRecalculate,batParam);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 正常缴纳页核算
|
* 正常缴纳页核算
|
||||||
|
|
|
||||||
|
|
@ -142,6 +142,43 @@ public class SalaryAcctController {
|
||||||
return new ResponseResult<Long, Long>(user).run(getSalaryAcctRecordWrapper(user)::reCalculate, param.getSalaryAcctRecordId());
|
return new ResponseResult<Long, Long>(user).run(getSalaryAcctRecordWrapper(user)::reCalculate, param.getSalaryAcctRecordId());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//薪资核算
|
||||||
|
@POST
|
||||||
|
@Path("/batAccounting")
|
||||||
|
@Produces(MediaType.APPLICATION_JSON)
|
||||||
|
public String batAccounting(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody SalaryAcctBatParam param) {
|
||||||
|
User user = HrmUserVarify.getUser(request, response);
|
||||||
|
return new ResponseResult<SalaryAcctBatParam, String>(user).run(getSalaryAcctRecordWrapper(user)::batCalculate, param);
|
||||||
|
}
|
||||||
|
|
||||||
|
//保存薪资核算的基本信息
|
||||||
|
@POST
|
||||||
|
@Path("/basic/batSave")
|
||||||
|
@Produces(MediaType.APPLICATION_JSON)
|
||||||
|
public String batSave(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody SalaryAcctBatParam param) {
|
||||||
|
User user = HrmUserVarify.getUser(request, response);
|
||||||
|
return new ResponseResult<SalaryAcctBatParam, Long>(user).run(getSalaryAcctRecordWrapper(user)::batSave, param);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//归档薪资核算记录
|
||||||
|
@POST
|
||||||
|
@Path("/batFile")
|
||||||
|
@Produces(MediaType.APPLICATION_JSON)
|
||||||
|
public String batFile(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody SalaryAcctBatParam param) {
|
||||||
|
User user = HrmUserVarify.getUser(request, response);
|
||||||
|
return new ResponseResult<SalaryAcctBatParam, Long>(user).run(getSalaryAcctRecordWrapper(user)::batFile, param);
|
||||||
|
}
|
||||||
|
|
||||||
|
//重新核算
|
||||||
|
@POST
|
||||||
|
@Path("/batReAccounting")
|
||||||
|
@Produces(MediaType.APPLICATION_JSON)
|
||||||
|
public String batReAccounting(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody SalaryAcctBatParam param) {
|
||||||
|
User user = HrmUserVarify.getUser(request, response);
|
||||||
|
return new ResponseResult<SalaryAcctBatParam, Long>(user).run(getSalaryAcctRecordWrapper(user)::batReCalculate, param);
|
||||||
|
}
|
||||||
|
|
||||||
//判断是否存在合并计税
|
//判断是否存在合并计税
|
||||||
@GET
|
@GET
|
||||||
@Path("/hasConsolidatedTax")
|
@Path("/hasConsolidatedTax")
|
||||||
|
|
|
||||||
|
|
@ -480,6 +480,29 @@ public class SalaryBillController {
|
||||||
return new ResponseResult<SalarySendWithdrawParam, Map<String, Object>>(user).run(getSalarySendWrapper(user)::withdraw, queryParam);
|
return new ResponseResult<SalarySendWithdrawParam, Map<String, Object>>(user).run(getSalarySendWrapper(user)::withdraw, queryParam);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@POST
|
||||||
|
@Path("/send/batGrant")
|
||||||
|
@Produces(MediaType.APPLICATION_JSON)
|
||||||
|
public String batGrant(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody SalarySendBatParam queryParam) {
|
||||||
|
User user = HrmUserVarify.getUser(request, response);
|
||||||
|
return new ResponseResult<SalarySendBatParam, Map<String, Object>>(user).run(getSalarySendWrapper(user)::batGrant, queryParam);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工资单撤回
|
||||||
|
*
|
||||||
|
* @param queryParam
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@POST
|
||||||
|
@Path("/send/batWithdraw")
|
||||||
|
@Produces(MediaType.APPLICATION_JSON)
|
||||||
|
public String batWithdraw(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody SalarySendBatParam queryParam) {
|
||||||
|
User user = HrmUserVarify.getUser(request, response);
|
||||||
|
return new ResponseResult<SalarySendBatParam, Map<String, Object>>(user).run(getSalarySendWrapper(user)::batWithdraw, queryParam);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 工资单发放详情列表的高级搜索
|
* 工资单发放详情列表的高级搜索
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -133,6 +133,20 @@ public class TaxDeclarationController {
|
||||||
return new ResponseResult<TaxDeclarationSaveParam, String>(user).run(getTaxDeclareRecordWrapper(user)::save, saveParam);
|
return new ResponseResult<TaxDeclarationSaveParam, String>(user).run(getTaxDeclareRecordWrapper(user)::save, saveParam);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 个税申报表批量生成
|
||||||
|
*
|
||||||
|
* @param param 批量保存参数
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@POST
|
||||||
|
@Path("/batSave")
|
||||||
|
@Produces(MediaType.APPLICATION_JSON)
|
||||||
|
public String batSave(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody TaxDeclarationSaveParam param) {
|
||||||
|
User user = HrmUserVarify.getUser(request, response);
|
||||||
|
return new ResponseResult<TaxDeclarationSaveParam, String>(user).run(getTaxDeclareRecordWrapper(user)::batSave, param);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 刷新个税申报表的待刷新标识
|
* 刷新个税申报表的待刷新标识
|
||||||
|
|
|
||||||
|
|
@ -93,7 +93,7 @@ public class AttendQuoteDataWrapper extends Service {
|
||||||
attendQuoteFields.stream()
|
attendQuoteFields.stream()
|
||||||
.filter(attendQuoteField->effectiveColumns.contains(Util.null2String(attendQuoteField.getId())))
|
.filter(attendQuoteField->effectiveColumns.contains(Util.null2String(attendQuoteField.getId())))
|
||||||
.forEach(attendQuoteField -> {
|
.forEach(attendQuoteField -> {
|
||||||
columns.add(Column.builder().title(attendQuoteField.getFieldName())
|
columns.add(Column.builder().title(Util.formatMultiLang(attendQuoteField.getFieldName(), String.valueOf(user.getLanguage())))
|
||||||
.dataIndex(attendQuoteField.getId() + "_attendQuoteData")
|
.dataIndex(attendQuoteField.getId() + "_attendQuoteData")
|
||||||
.key(attendQuoteField.getId() + "_attendQuoteData").display(Boolean.TRUE).build());
|
.key(attendQuoteField.getId() + "_attendQuoteData").display(Boolean.TRUE).build());
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -10,12 +10,13 @@ import com.engine.salary.entity.salaryacct.bo.SalaryAcctRecordBO;
|
||||||
import com.engine.salary.entity.salaryacct.dto.SalaryAcctEmployeeCountDTO;
|
import com.engine.salary.entity.salaryacct.dto.SalaryAcctEmployeeCountDTO;
|
||||||
import com.engine.salary.entity.salaryacct.dto.SalaryAcctRecordFormDTO;
|
import com.engine.salary.entity.salaryacct.dto.SalaryAcctRecordFormDTO;
|
||||||
import com.engine.salary.entity.salaryacct.dto.SalaryAcctRecordListDTO;
|
import com.engine.salary.entity.salaryacct.dto.SalaryAcctRecordListDTO;
|
||||||
|
import com.engine.salary.entity.salaryacct.param.SalaryAcctBatParam;
|
||||||
|
import com.engine.salary.entity.salaryacct.param.SalaryAcctCalculateParam;
|
||||||
import com.engine.salary.entity.salaryacct.param.SalaryAcctRecordQueryParam;
|
import com.engine.salary.entity.salaryacct.param.SalaryAcctRecordQueryParam;
|
||||||
import com.engine.salary.entity.salaryacct.param.SalaryAcctRecordSaveParam;
|
import com.engine.salary.entity.salaryacct.param.SalaryAcctRecordSaveParam;
|
||||||
import com.engine.salary.entity.salaryacct.po.SalaryAcctRecordPO;
|
import com.engine.salary.entity.salaryacct.po.SalaryAcctRecordPO;
|
||||||
import com.engine.salary.entity.salaryacct.po.SalaryAcctSobConfigPO;
|
import com.engine.salary.entity.salaryacct.po.SalaryAcctSobConfigPO;
|
||||||
import com.engine.salary.entity.salarysob.dto.SalarySobCycleDTO;
|
import com.engine.salary.entity.salarysob.dto.SalarySobCycleDTO;
|
||||||
import com.engine.salary.entity.salarysob.po.SalaryApprovalRulePO;
|
|
||||||
import com.engine.salary.entity.salarysob.po.*;
|
import com.engine.salary.entity.salarysob.po.*;
|
||||||
import com.engine.salary.entity.taxagent.po.TaxAgentPO;
|
import com.engine.salary.entity.taxagent.po.TaxAgentPO;
|
||||||
import com.engine.salary.enums.salaryaccounting.SalaryAcctRecordStatusEnum;
|
import com.engine.salary.enums.salaryaccounting.SalaryAcctRecordStatusEnum;
|
||||||
|
|
@ -55,6 +56,9 @@ public class SalaryAcctRecordWrapper extends Service implements SalaryAcctRecord
|
||||||
private SalaryAcctRecordService getSalaryAcctRecordService(User user) {
|
private SalaryAcctRecordService getSalaryAcctRecordService(User user) {
|
||||||
return ServiceUtil.getService(SalaryAcctRecordServiceImpl.class, user);
|
return ServiceUtil.getService(SalaryAcctRecordServiceImpl.class, user);
|
||||||
}
|
}
|
||||||
|
private SalaryAcctResultWrapper getSalaryAcctResultWrapper(User user) {
|
||||||
|
return ServiceUtil.getService(SalaryAcctResultWrapper.class, user);
|
||||||
|
}
|
||||||
|
|
||||||
private SalarySobService getSalarySobService(User user) {
|
private SalarySobService getSalarySobService(User user) {
|
||||||
return ServiceUtil.getService(SalarySobServiceImpl.class, user);
|
return ServiceUtil.getService(SalarySobServiceImpl.class, user);
|
||||||
|
|
@ -380,4 +384,28 @@ public class SalaryAcctRecordWrapper extends Service implements SalaryAcctRecord
|
||||||
public void updateSobConfig(Long id) {
|
public void updateSobConfig(Long id) {
|
||||||
getSalaryAcctSobConfigService(user).updateBySalaryAcctRecordId(id);
|
getSalaryAcctSobConfigService(user).updateBySalaryAcctRecordId(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void batSave(SalaryAcctBatParam param) {
|
||||||
|
getSalaryAcctRecordService(user).batSave(param);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void batFile(SalaryAcctBatParam param) {
|
||||||
|
getSalaryAcctRecordService(user).batFile(param);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void batReCalculate(SalaryAcctBatParam param) {
|
||||||
|
getSalaryAcctRecordService(user).batReCalculate(param);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void batCalculate(SalaryAcctBatParam param) {
|
||||||
|
List<Long> salaryAcctRecordIds = param.getSalaryAcctRecordIds();
|
||||||
|
for (int i = 0; i < salaryAcctRecordIds.size(); i++) {
|
||||||
|
Long recordId = salaryAcctRecordIds.get(i);
|
||||||
|
SalaryAcctCalculateParam calculateParam = SalaryAcctCalculateParam.builder().salaryAcctRecordId(recordId).build();
|
||||||
|
getSalaryAcctResultWrapper(user).calculate(calculateParam);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -738,4 +738,28 @@ public class SalarySendWrapper extends Service implements SalarySendWrapperProxy
|
||||||
public String genPdfBeforeExport(SalaryExportPdfParam salaryExportPdfParam) {
|
public String genPdfBeforeExport(SalaryExportPdfParam salaryExportPdfParam) {
|
||||||
return getSalaryBillService(user).genPdfBeforeExport(salaryExportPdfParam);
|
return getSalaryBillService(user).genPdfBeforeExport(salaryExportPdfParam);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void batGrant(SalarySendBatParam param) {
|
||||||
|
List<Long> salarySendIds = param.getSalarySendIds();
|
||||||
|
|
||||||
|
for (int i = 0; i < salarySendIds.size(); i++) {
|
||||||
|
Long sendId = salarySendIds.get(i);
|
||||||
|
SalarySendGrantParam grantParam = SalarySendGrantParam.builder()
|
||||||
|
.salarySendId(sendId)
|
||||||
|
.build();
|
||||||
|
grant(grantParam);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public void batWithdraw(SalarySendBatParam param) {
|
||||||
|
List<Long> salarySendIds = param.getSalarySendIds();
|
||||||
|
|
||||||
|
for (int i = 0; i < salarySendIds.size(); i++) {
|
||||||
|
Long sendId = salarySendIds.get(i);
|
||||||
|
SalarySendWithdrawParam grantParam = SalarySendWithdrawParam.builder()
|
||||||
|
.salarySendId(sendId)
|
||||||
|
.build();
|
||||||
|
withdraw(grantParam);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -31,5 +31,4 @@ public class TaxDeclarationWrapper extends Service {
|
||||||
private SalaryEmployeeService getSalaryEmployeeService(User user) {
|
private SalaryEmployeeService getSalaryEmployeeService(User user) {
|
||||||
return ServiceUtil.getService(SalaryEmployeeServiceImpl.class, user);
|
return ServiceUtil.getService(SalaryEmployeeServiceImpl.class, user);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -416,6 +416,29 @@ public class TaxDeclareRecordWrapper extends Service {
|
||||||
return taxDeclarationRate.getIndex();
|
return taxDeclarationRate.getIndex();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String batSave(TaxDeclarationSaveParam param) {
|
||||||
|
List<Long> taxAgentIds = param.getTaxAgentIds();
|
||||||
|
int success = 0;
|
||||||
|
int fail = 0;
|
||||||
|
StringBuilder msg = new StringBuilder();
|
||||||
|
for (Long taxAgentId : taxAgentIds) {
|
||||||
|
try {
|
||||||
|
param.setTaxAgentId(taxAgentId);
|
||||||
|
getTaxDeclareRecordService(user).save(param);
|
||||||
|
success++;
|
||||||
|
} catch (SalaryRunTimeException e) {
|
||||||
|
msg.append(e.getMessage()).append(";");
|
||||||
|
fail++;
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("个税申报表生成报错:{}", e.getMessage(), e);
|
||||||
|
msg.append(e.getMessage()).append(";");
|
||||||
|
fail++;
|
||||||
|
} finally {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return "成功:" + success + "个,失败:" + fail + "个,失败原因:" + msg;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新个税申报表的待刷新数据的标识
|
* 更新个税申报表的待刷新数据的标识
|
||||||
*
|
*
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue