在线申报接口
This commit is contained in:
parent
215e25fa31
commit
bb2d2d64e6
|
|
@ -1,2 +0,0 @@
|
|||
hrsa_tax_declare_api_profile
|
||||
|
||||
|
|
@ -1,138 +0,0 @@
|
|||
delete from hrsa_acct_result_temp where 1=1
|
||||
;
|
||||
delete from hrsa_add_up_deduction where 1=1
|
||||
;
|
||||
delete from hrsa_add_up_situation where 1=1
|
||||
;
|
||||
delete from hrsa_attend_quote where 1=1
|
||||
;
|
||||
delete from hrsa_attend_quote_data where 1=1
|
||||
;
|
||||
delete from hrsa_attend_quote_data_value where 1=1
|
||||
;
|
||||
delete from hrsa_attend_quote_field where 1=1
|
||||
;
|
||||
delete from hrsa_attend_quote_sync_set where 1=1
|
||||
;
|
||||
|
||||
|
||||
delete from hrsa_scheme_detail where 1=1
|
||||
;
|
||||
delete from hrsa_social_archives where 1=1
|
||||
;
|
||||
delete from hrsa_fund_archives where 1=1
|
||||
;
|
||||
delete from hrsa_other_archives where 1=1
|
||||
;
|
||||
|
||||
|
||||
delete from hrsa_bill_batch where 1=1
|
||||
;
|
||||
|
||||
delete from hrsa_bill_detail where 1=1
|
||||
;
|
||||
delete from hrsa_bill_detail_temp where 1=1
|
||||
;
|
||||
delete from hrsa_bill_inspect where 1=1
|
||||
;
|
||||
|
||||
|
||||
|
||||
delete from hrsa_check_result where 1=1
|
||||
;
|
||||
delete from hrsa_check_result_record where 1=1
|
||||
;
|
||||
delete from hrsa_ck_result_detail_temp where 1=1
|
||||
;
|
||||
delete from hrsa_excel_acct_result where 1=1
|
||||
;
|
||||
|
||||
delete from hrsa_other_deduction where 1=1
|
||||
;
|
||||
delete from hrsa_salary_acct_emp where 1=1
|
||||
;
|
||||
delete from hrsa_salary_acct_record where 1=1
|
||||
;
|
||||
delete from hrsa_salary_acct_result where 1=1
|
||||
;
|
||||
delete from hrsa_salary_archive where 1=1
|
||||
;
|
||||
delete from hrsa_salary_archive_dimission where 1=1
|
||||
;
|
||||
delete from hrsa_salary_archive_item where 1=1
|
||||
;
|
||||
delete from hrsa_salary_archive_tax_agent where 1=1
|
||||
;
|
||||
delete from hrsa_salary_item where 1=1
|
||||
;
|
||||
delete from hrsa_salary_send where 1=1
|
||||
;
|
||||
delete from hrsa_salary_send_info where 1=1
|
||||
;
|
||||
delete from hrsa_salary_sob where 1=1
|
||||
;
|
||||
delete from hrsa_salary_sob_adjust_rule where 1=1
|
||||
;
|
||||
delete from hrsa_salary_sob_emp_field where 1=1
|
||||
;
|
||||
delete from hrsa_salary_sob_item where 1=1
|
||||
;
|
||||
delete from hrsa_salary_sob_item_group where 1=1
|
||||
;
|
||||
delete from hrsa_salary_sob_range where 1=1
|
||||
;
|
||||
delete from hrsa_salary_template where 1=1
|
||||
;
|
||||
|
||||
delete from hrsa_social_security_scheme where 1=1
|
||||
;
|
||||
delete from hrsa_sys_tax_rate_base where 1=1
|
||||
;
|
||||
delete from hrsa_sys_tax_rate_detail where 1=1
|
||||
;
|
||||
delete from hrsa_tax_agent where 1=1
|
||||
;
|
||||
delete from hrsa_tax_agent_emp where 1=1
|
||||
;
|
||||
delete from hrsa_tax_agent_emp_change where 1=1
|
||||
;
|
||||
delete from hrsa_tax_agent_admin where 1=1
|
||||
;
|
||||
delete from hrsa_tax_agent_manage_range where 1=1
|
||||
;
|
||||
|
||||
delete from hrsa_tax_agent_sub_admin where 1=1
|
||||
;
|
||||
delete from hrsa_tax_agent_sub_admin_emp where 1=1
|
||||
;
|
||||
|
||||
delete from hrsa_tax_declaration where 1=1
|
||||
;
|
||||
delete from hrsa_tax_declaration_detail where 1=1
|
||||
;
|
||||
delete from hrsa_tax_rate_base where 1=1
|
||||
;
|
||||
delete from hrsa_tax_rate_detail where 1=1
|
||||
;
|
||||
delete from hrsa_salary_acct_result_report where 1=1
|
||||
;
|
||||
|
||||
delete from hrsa_insurance_base_info where 1=1
|
||||
;
|
||||
|
||||
|
||||
delete from hrsa_salary_sob_back_item where 1=1
|
||||
;
|
||||
delete from hrsa_salary_send_range where 1=1
|
||||
;
|
||||
delete from hrsa_salary_send_range_obj where 1=1
|
||||
;
|
||||
delete from hrsa_compensation_log where 1=1
|
||||
;
|
||||
delete from hrsa_compensation_config where 1=1
|
||||
;
|
||||
delete from hrsa_special_add_deduction where 1=1
|
||||
;
|
||||
|
||||
|
||||
|
||||
|
|
@ -16,7 +16,7 @@ public class SzyhApiConstant {
|
|||
/**
|
||||
* 测试接口host
|
||||
*/
|
||||
public static final String TEST_HOST_URL = "https://ddapi-t.bigfintax.com/";
|
||||
public static final String TEST_HOST_URL = "https://uat-ddapi.bigfintax.com/";
|
||||
|
||||
/**
|
||||
* 企业注册接口
|
||||
|
|
|
|||
|
|
@ -47,7 +47,8 @@ public class EmployeeDeclareRefresh {
|
|||
// 对已有人员处理「人员状态」、「离职日期」、「任职受雇从业类型」
|
||||
for (EmployeeDeclarePO employeeDeclare : dto.getEmployeeDeclares()) {
|
||||
SalaryArchivePO salaryArchive = salaryArchiveMap.get(employeeDeclare.getEmployeeId());
|
||||
if (salaryArchive != null && (Objects.equals(salaryArchive.getRunStatus(), SalaryArchiveStatusEnum.STOP_FROM_PENDING.getValue())
|
||||
if (salaryArchive != null &&
|
||||
(Objects.equals(salaryArchive.getRunStatus(), SalaryArchiveStatusEnum.STOP_FROM_PENDING.getValue())
|
||||
|| Objects.equals(salaryArchive.getRunStatus(), SalaryArchiveStatusEnum.STOP_FROM_SUSPEND.getValue()))) {
|
||||
if (Objects.equals(employeeDeclare.getEmploymentStatus(), EmploymentStatusEnum.ABNORMAL.getValue())
|
||||
|| Objects.equals(Util.null2String(employeeDeclare.getDismissDate()), Util.null2String(salaryArchive.getPayEndDate()))) {
|
||||
|
|
@ -75,11 +76,11 @@ public class EmployeeDeclareRefresh {
|
|||
if (!employeeIds.contains(preTaxCycleEmployeeDeclare.getEmployeeId())) {
|
||||
EmployeeDeclarePO employeeDeclare = new EmployeeDeclarePO();
|
||||
BeanUtils.copyProperties(preTaxCycleEmployeeDeclare, employeeDeclare);
|
||||
employeeDeclare.setId(IdGenerator.generate())
|
||||
.setTaxCycle(dto.getTaxCycle())
|
||||
.setNewEmployeeInfo(0)
|
||||
.setCreateTime(now)
|
||||
.setUpdateTime(now);
|
||||
employeeDeclare.setId(IdGenerator.generate());
|
||||
employeeDeclare.setTaxCycle(dto.getTaxCycle());
|
||||
employeeDeclare.setNewEmployeeInfo(0);
|
||||
employeeDeclare.setCreateTime(now);
|
||||
employeeDeclare.setUpdateTime(now);
|
||||
// 对人员处理「人员状态」、「离职日期」、「任职受雇从业类型」
|
||||
SalaryArchivePO salaryArchive = salaryArchiveMap.get(employeeDeclare.getEmployeeId());
|
||||
if (salaryArchive != null && (Objects.equals(salaryArchive.getRunStatus(), SalaryArchiveStatusEnum.STOP_FROM_PENDING.getValue())
|
||||
|
|
@ -112,15 +113,14 @@ public class EmployeeDeclareRefresh {
|
|||
EmployeeDeclarePO employeeDeclare = initEmployeeDeclare(dto.getTaxAgentId(), dto.getTaxCycle(), now, employeeId);
|
||||
DataCollectionEmployee simpleUserInfo = simpleUserInfoMap.get(hrmEmployeeComInfo.getEmployeeId());
|
||||
String idNum = simpleUserInfo == null ? "" : simpleUserInfo.getIdNo();
|
||||
employeeDeclare.setEmployeeId(hrmEmployeeComInfo.getEmployeeId())
|
||||
.setEmployeeType(EmployeeTypeEnum.ORGANIZATION.getValue())
|
||||
.setEmployeeName(hrmEmployeeComInfo.getUsername())
|
||||
.setJobNum(hrmEmployeeComInfo.getWorkcode())
|
||||
.setCardNum(idNum)
|
||||
.setGender(StringUtils.equalsIgnoreCase(hrmEmployeeComInfo.getSex(), GenderEnum.MALE.name())
|
||||
? GenderEnum.MALE.getValue() : GenderEnum.FEMALE.getValue())
|
||||
.setBirthday(simpleUserInfo == null || simpleUserInfo.getBirthday() == null ? null : SalaryDateUtil.dateStrToLocalDate(simpleUserInfo.getBirthday()))
|
||||
.setMobile(hrmEmployeeComInfo.getMobile());
|
||||
employeeDeclare.setEmployeeId(hrmEmployeeComInfo.getEmployeeId());
|
||||
employeeDeclare.setEmployeeType(EmployeeTypeEnum.ORGANIZATION.getValue());
|
||||
employeeDeclare.setEmployeeName(hrmEmployeeComInfo.getUsername());
|
||||
employeeDeclare.setJobNum(hrmEmployeeComInfo.getWorkcode());
|
||||
employeeDeclare.setCardNum(idNum);
|
||||
employeeDeclare.setGender(StringUtils.equalsIgnoreCase(hrmEmployeeComInfo.getSex(), GenderEnum.MALE.name()) ? GenderEnum.MALE.getValue() : GenderEnum.FEMALE.getValue());
|
||||
employeeDeclare.setBirthday(simpleUserInfo == null || simpleUserInfo.getBirthday() == null ? null : SalaryDateUtil.dateStrToLocalDate(simpleUserInfo.getBirthday()));
|
||||
employeeDeclare.setMobile(hrmEmployeeComInfo.getMobile());
|
||||
if (StringUtils.isEmpty(idNum)) {
|
||||
employeeDeclare.setDeclareStatus(DeclareStatusEnum.DECLARE_FAIL.getValue());
|
||||
employeeDeclare.setDeclareErrorMsg(SalaryI18nUtil.getI18nLabel(187460, "身份证号不能为空"));
|
||||
|
|
@ -175,30 +175,31 @@ public class EmployeeDeclareRefresh {
|
|||
}
|
||||
|
||||
private static EmployeeDeclarePO initEmployeeDeclare(Long taxAgentId, Date taxCycle, Date now, Long employeeId) {
|
||||
return new EmployeeDeclarePO()
|
||||
.setId(IdGenerator.generate())
|
||||
.setTaxAgentId(taxAgentId)
|
||||
.setTaxCycle(taxCycle)
|
||||
.setCardType(CardTypeEnum.RESIDENT_IDENTITY_CARDS.getValue())
|
||||
.setGender(GenderEnum.MALE.getValue())
|
||||
.setEmploymentStatus(EmploymentStatusEnum.NORMAL.getValue())
|
||||
.setEmploymentType(EmploymentTypeEnum.EMPLOYEE.getValue())
|
||||
.setDeclareStatus(DeclareStatusEnum.NOT_DECLARE.getValue())
|
||||
.setDeclareErrorMsg("")
|
||||
.setDisability(SalaryOnOffEnum.OFF.getValue())
|
||||
.setDisabilityCardNo("")
|
||||
.setLonelyOld(SalaryOnOffEnum.OFF.getValue())
|
||||
.setMartyrDependents(SalaryOnOffEnum.OFF.getValue())
|
||||
.setMartyrDependentsCardNo("")
|
||||
.setDeductExpenses(SalaryOnOffEnum.ON.getValue())
|
||||
.setSuccessfullyDeclared(0)
|
||||
.setNewEmployeeInfo(0)
|
||||
.setDeclareStatus(DeclareStatusEnum.NOT_DECLARE.getValue())
|
||||
.setTenantKey(SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY)
|
||||
.setCreator(employeeId)
|
||||
.setDeleteType(DeleteTypeEnum.NOT_DELETED.getValue())
|
||||
.setCreateTime(now)
|
||||
.setUpdateTime(now);
|
||||
EmployeeDeclarePO employeeDeclarePO = new EmployeeDeclarePO();
|
||||
employeeDeclarePO.setId(IdGenerator.generate());
|
||||
employeeDeclarePO.setTaxAgentId(taxAgentId);
|
||||
employeeDeclarePO.setTaxCycle(taxCycle);
|
||||
employeeDeclarePO.setCardType(CardTypeEnum.RESIDENT_IDENTITY_CARDS.getValue());
|
||||
employeeDeclarePO.setGender(GenderEnum.MALE.getValue());
|
||||
employeeDeclarePO.setEmploymentStatus(EmploymentStatusEnum.NORMAL.getValue());
|
||||
employeeDeclarePO.setEmploymentType(EmploymentTypeEnum.EMPLOYEE.getValue());
|
||||
employeeDeclarePO.setDeclareStatus(DeclareStatusEnum.NOT_DECLARE.getValue());
|
||||
employeeDeclarePO.setDeclareErrorMsg("");
|
||||
employeeDeclarePO.setDisability(SalaryOnOffEnum.OFF.getValue());
|
||||
employeeDeclarePO.setDisabilityCardNo("");
|
||||
employeeDeclarePO.setLonelyOld(SalaryOnOffEnum.OFF.getValue());
|
||||
employeeDeclarePO.setMartyrDependents(SalaryOnOffEnum.OFF.getValue());
|
||||
employeeDeclarePO.setMartyrDependentsCardNo("");
|
||||
employeeDeclarePO.setDeductExpenses(SalaryOnOffEnum.ON.getValue());
|
||||
employeeDeclarePO.setSuccessfullyDeclared(0);
|
||||
employeeDeclarePO.setNewEmployeeInfo(0);
|
||||
employeeDeclarePO.setDeclareStatus(DeclareStatusEnum.NOT_DECLARE.getValue());
|
||||
employeeDeclarePO.setTenantKey(SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY);
|
||||
employeeDeclarePO.setCreator(employeeId);
|
||||
employeeDeclarePO.setDeleteType(DeleteTypeEnum.NOT_DELETED.getValue());
|
||||
employeeDeclarePO.setCreateTime(now);
|
||||
employeeDeclarePO.setUpdateTime(now);
|
||||
return employeeDeclarePO;
|
||||
}
|
||||
|
||||
@Data
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@ import lombok.AllArgsConstructor;
|
|||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Date;
|
||||
|
|
@ -24,7 +23,6 @@ import java.util.Date;
|
|||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Accessors(chain = true)
|
||||
//hrsa_employee_declare
|
||||
public class EmployeeDeclarePO {
|
||||
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ import com.engine.salary.entity.taxdeclaration.po.TaxReportColumnPO;
|
|||
import com.engine.salary.enums.salaryitem.SalaryDataTypeEnum;
|
||||
import com.engine.salary.enums.salarysob.IncomeCategoryEnum;
|
||||
import com.engine.salary.enums.sicategory.DeleteTypeEnum;
|
||||
import com.engine.salary.util.SalaryDateUtil;
|
||||
import com.engine.salary.util.SalaryEntityUtil;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Maps;
|
||||
|
|
@ -148,7 +149,7 @@ public class TaxDeclarationCommon implements TaxDeclarationStrategy {
|
|||
// .employeeType(lastSalaryAcctEmployee.getEmployeeType())
|
||||
.taxAgentId(lastSalaryAcctEmployee.getTaxAgentId())
|
||||
.taxYearMonth(taxDeclaration.getTaxCycle())
|
||||
.year(taxDeclaration.getTaxCycle().getYear())
|
||||
.year(SalaryDateUtil.date2Year(taxDeclaration.getTaxCycle()))
|
||||
.addUpIncome(valueMap.get("addUpIncome"))
|
||||
.addUpSocialSecurityTotal(valueMap.get("addUpSocialSecurityTotal"))
|
||||
.addUpAccumulationFundTotal(valueMap.get("addUpAccumulationFundTotal"))
|
||||
|
|
|
|||
|
|
@ -982,6 +982,9 @@
|
|||
<if test="salaryMonth != null">
|
||||
AND t.salary_month = #{salaryMonth}
|
||||
</if>
|
||||
<if test="taxCycle != null">
|
||||
AND r.tax_cycle = #{taxCycle}
|
||||
</if>
|
||||
<if test="creator != null">
|
||||
AND t.creator = #{creator}
|
||||
</if>
|
||||
|
|
|
|||
|
|
@ -94,6 +94,12 @@
|
|||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="taxDeclarationIds != null and taxDeclarationIds.size()>0">
|
||||
AND tax_declaration_id IN
|
||||
<foreach collection="taxDeclarationIds" open="(" item="taxDeclarationId" separator="," close=")">
|
||||
#{taxDeclarationId}
|
||||
</foreach>
|
||||
</if>
|
||||
ORDER BY id DESC
|
||||
</select>
|
||||
|
||||
|
|
@ -367,7 +373,8 @@
|
|||
</resultMap>
|
||||
|
||||
<sql id="TaxDeclareEmployeeSql">
|
||||
employee_id, employee_type
|
||||
employee_id
|
||||
, employee_type
|
||||
</sql>
|
||||
|
||||
<sql id="NotDeclareSql">
|
||||
|
|
|
|||
|
|
@ -124,6 +124,8 @@ public interface SalaryAcctEmployeeService {
|
|||
*/
|
||||
List<SalaryAcctEmployeePO> listByParam(SalaryAcctEmployeeQueryParam queryParam);
|
||||
|
||||
List<SalaryAcctEmployeePO> listByTaxCycleAndTaxAgentId(SalaryAcctEmployeeQueryParam queryParam);
|
||||
|
||||
/**
|
||||
* 根据薪资核算结果列表的列表查询条件查询薪资核算人员(分页)
|
||||
*
|
||||
|
|
|
|||
|
|
@ -185,40 +185,40 @@ public class EmployeeDeclareServiceImpl extends Service implements EmployeeDecla
|
|||
@Override
|
||||
public void save(EmployeeDeclareSaveParam saveParam) {
|
||||
Date now = new Date();
|
||||
EmployeeDeclarePO employeeDeclare = new EmployeeDeclarePO()
|
||||
.setTaxAgentId(saveParam.getTaxAgentId())
|
||||
.setTaxCycle(saveParam.getTaxCycle())
|
||||
.setEmployeeName(saveParam.getEmployeeName())
|
||||
.setJobNum(saveParam.getJobNum())
|
||||
.setCardType(CardTypeEnum.RESIDENT_IDENTITY_CARDS.getValue())
|
||||
.setCardNum(saveParam.getCardNum())
|
||||
.setGender(SalaryCardUtil.judgeGender(saveParam.getCardNum()).getValue())
|
||||
.setBirthday(SalaryDateUtil.localDateToDate(SalaryCardUtil.judgeBirthday(saveParam.getCardNum())))
|
||||
.setEmploymentStatus(saveParam.getEmploymentStatus().getValue())
|
||||
.setMobile(saveParam.getMobile())
|
||||
.setEmploymentType(saveParam.getEmploymentType().getValue())
|
||||
.setEmploymentFirstYear("")
|
||||
.setEmploymentDate(SalaryDateUtil.localDateToDate(saveParam.getEmploymentDate()))
|
||||
.setDismissDate(SalaryDateUtil.localDateToDate(saveParam.getDismissDate()))
|
||||
.setDisability(saveParam.getDisability().getValue())
|
||||
.setDisabilityCardNo(saveParam.getDisabilityCardNo())
|
||||
.setLonelyOld(saveParam.getLonelyOld().getValue())
|
||||
.setMartyrDependents(saveParam.getMartyrDependents().getValue())
|
||||
.setMartyrDependentsCardNo(saveParam.getMartyrDependentsCardNo())
|
||||
.setDeductExpenses(saveParam.getDeductExpenses().getValue())
|
||||
.setSuccessfullyDeclared(0)
|
||||
.setNewEmployeeInfo(0)
|
||||
.setDeclareStatus(DeclareStatusEnum.NOT_DECLARE.getValue())
|
||||
.setDeclareErrorMsg("");
|
||||
EmployeeDeclarePO employeeDeclare = new EmployeeDeclarePO();
|
||||
employeeDeclare.setTaxAgentId(saveParam.getTaxAgentId());
|
||||
employeeDeclare.setTaxCycle(saveParam.getTaxCycle());
|
||||
employeeDeclare.setEmployeeName(saveParam.getEmployeeName());
|
||||
employeeDeclare.setJobNum(saveParam.getJobNum());
|
||||
employeeDeclare.setCardType(CardTypeEnum.RESIDENT_IDENTITY_CARDS.getValue());
|
||||
employeeDeclare.setCardNum(saveParam.getCardNum());
|
||||
employeeDeclare.setGender(SalaryCardUtil.judgeGender(saveParam.getCardNum()).getValue());
|
||||
employeeDeclare.setBirthday(SalaryDateUtil.localDateToDate(SalaryCardUtil.judgeBirthday(saveParam.getCardNum())));
|
||||
employeeDeclare.setEmploymentStatus(saveParam.getEmploymentStatus().getValue());
|
||||
employeeDeclare.setMobile(saveParam.getMobile());
|
||||
employeeDeclare.setEmploymentType(saveParam.getEmploymentType().getValue());
|
||||
employeeDeclare.setEmploymentFirstYear("");
|
||||
employeeDeclare.setEmploymentDate(SalaryDateUtil.localDateToDate(saveParam.getEmploymentDate()));
|
||||
employeeDeclare.setDismissDate(SalaryDateUtil.localDateToDate(saveParam.getDismissDate()));
|
||||
employeeDeclare.setDisability(saveParam.getDisability().getValue());
|
||||
employeeDeclare.setDisabilityCardNo(saveParam.getDisabilityCardNo());
|
||||
employeeDeclare.setLonelyOld(saveParam.getLonelyOld().getValue());
|
||||
employeeDeclare.setMartyrDependents(saveParam.getMartyrDependents().getValue());
|
||||
employeeDeclare.setMartyrDependentsCardNo(saveParam.getMartyrDependentsCardNo());
|
||||
employeeDeclare.setDeductExpenses(saveParam.getDeductExpenses().getValue());
|
||||
employeeDeclare.setSuccessfullyDeclared(0);
|
||||
employeeDeclare.setNewEmployeeInfo(0);
|
||||
employeeDeclare.setDeclareStatus(DeclareStatusEnum.NOT_DECLARE.getValue());
|
||||
employeeDeclare.setDeclareErrorMsg("");
|
||||
if (Objects.isNull(saveParam.getId())) {
|
||||
employeeDeclare.setId(IdGenerator.generate())
|
||||
.setEmployeeId(saveParam.getEmployeeId())
|
||||
.setEmployeeType(saveParam.getEmployeeType().getValue())
|
||||
.setTenantKey(SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY)
|
||||
.setCreator((long) user.getUID())
|
||||
.setDeleteType(DeleteTypeEnum.NOT_DELETED.getValue())
|
||||
.setCreateTime(now)
|
||||
.setUpdateTime(now);
|
||||
employeeDeclare.setId(IdGenerator.generate());
|
||||
employeeDeclare.setEmployeeId(saveParam.getEmployeeId());
|
||||
employeeDeclare.setEmployeeType(saveParam.getEmployeeType().getValue());
|
||||
employeeDeclare.setTenantKey(SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY);
|
||||
employeeDeclare.setCreator((long) user.getUID());
|
||||
employeeDeclare.setDeleteType(DeleteTypeEnum.NOT_DELETED.getValue());
|
||||
employeeDeclare.setCreateTime(now);
|
||||
employeeDeclare.setUpdateTime(now);
|
||||
getEmployeeDeclareMapper().insertIgnoreNull(employeeDeclare);
|
||||
// 记录日志
|
||||
// LoggerContext<EmployeeDeclarePO> loggerContext = new LoggerContext<>();
|
||||
|
|
@ -239,11 +239,11 @@ public class EmployeeDeclareServiceImpl extends Service implements EmployeeDecla
|
|||
&& !Objects.equals(originEmployeeDeclare.getCardNum(), employeeDeclare.getCardNum())) {
|
||||
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(156443, "成功报送过的人员,姓名和证件号码只能修改其一,同时需要修改的请前往办税服务厅"));
|
||||
}
|
||||
employeeDeclare.setId(originEmployeeDeclare.getId())
|
||||
.setEmployeeId(originEmployeeDeclare.getEmployeeId())
|
||||
.setEmployeeType(originEmployeeDeclare.getEmployeeType())
|
||||
.setSuccessfullyDeclared(originEmployeeDeclare.getSuccessfullyDeclared())
|
||||
.setUpdateTime(now);
|
||||
employeeDeclare.setId(originEmployeeDeclare.getId());
|
||||
employeeDeclare.setEmployeeId(originEmployeeDeclare.getEmployeeId());
|
||||
employeeDeclare.setEmployeeType(originEmployeeDeclare.getEmployeeType());
|
||||
employeeDeclare.setSuccessfullyDeclared(originEmployeeDeclare.getSuccessfullyDeclared());
|
||||
employeeDeclare.setUpdateTime(now);
|
||||
// 判断本次编辑是否有修改人员信息
|
||||
if (!StringUtils.equals(employeeDeclare.toCompareString(), originEmployeeDeclare.toCompareString())) {
|
||||
employeeDeclare.setNewEmployeeInfo(1);
|
||||
|
|
|
|||
|
|
@ -207,13 +207,18 @@ public class SalaryAcctEmployeeServiceImpl extends Service implements SalaryAcct
|
|||
|
||||
@Override
|
||||
public List<SalaryAcctEmployeePO> listByParam(SalaryAcctEmployeeQueryParam queryParam) {
|
||||
ValidUtil.doValidator(queryParam);
|
||||
// ValidUtil.doValidator(queryParam);
|
||||
//排序配置
|
||||
OrderRuleVO orderRule = getSalarySysConfService(user).orderRule();
|
||||
queryParam.setOrderRule(orderRule);
|
||||
return getSalaryAcctEmployeeMapper().list(queryParam);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SalaryAcctEmployeePO> listByTaxCycleAndTaxAgentId(SalaryAcctEmployeeQueryParam queryParam) {
|
||||
return getSalaryAcctEmployeeMapper().listSome(SalaryAcctEmployeePO.builder().taxAgentIds(queryParam.getTaxAgentIds()).taxCycle(queryParam.getTaxCycle()).build());
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageInfo<SalaryAcctEmployeePO> listPageByResultQueryParam(SalaryAcctResultQueryParam queryParam) {
|
||||
ValidUtil.doValidator(queryParam);
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ public class TaxDeclarationApiBillingServiceImpl extends Service implements Tax
|
|||
@Override
|
||||
public void updateApiFlowInfo(ApiFlowUpdateWrapper updateWrapper) {
|
||||
// 保存流量使用详情
|
||||
saveApiFlowRecord(updateWrapper);
|
||||
// saveApiFlowRecord(updateWrapper);
|
||||
// 流量不足提醒
|
||||
// taxDeclarationApiFlowWarnService.sendFlowWarnMessage(updateWrapper);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -331,8 +331,12 @@ public class TaxDeclareRecordServiceImpl extends Service implements TaxDeclareRe
|
|||
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(182700, "对不起,只有未申报状态下可以刷新数据"));
|
||||
}
|
||||
// 查询税款所属期下的薪资核算人员
|
||||
SalaryAcctEmployeeQueryParam salaryAcctEmployeeQueryParam = SalaryAcctEmployeeQueryParam.builder().taxAgentIds(Collections.singletonList(taxDeclareRecord.getTaxAgentId())).taxCycle(taxDeclareRecord.getTaxCycle()).build();
|
||||
List<SalaryAcctEmployeePO> salaryAcctEmployees = getSalaryAcctEmployeeService(user).listByParam(salaryAcctEmployeeQueryParam);
|
||||
SalaryAcctEmployeeQueryParam salaryAcctEmployeeQueryParam = SalaryAcctEmployeeQueryParam
|
||||
.builder()
|
||||
.taxAgentIds(Collections.singletonList(taxDeclareRecord.getTaxAgentId()))
|
||||
.taxCycle(taxDeclareRecord.getTaxCycle())
|
||||
.build();
|
||||
List<SalaryAcctEmployeePO> salaryAcctEmployees = getSalaryAcctEmployeeService(user).listByTaxCycleAndTaxAgentId(salaryAcctEmployeeQueryParam);
|
||||
// 查询薪资核算记录
|
||||
Set<Long> salaryAcctRecordIds = SalaryEntityUtil.properties(salaryAcctEmployees, SalaryAcctEmployeePO::getSalaryAcctRecordId);
|
||||
List<SalaryAcctRecordPO> salaryAcctRecords = getSalaryAcctRecordService(user).listByIds(salaryAcctRecordIds);
|
||||
|
|
@ -429,7 +433,7 @@ public class TaxDeclareRecordServiceImpl extends Service implements TaxDeclareRe
|
|||
List<SalaryAcctRecordPO> archivedSalaryAcctRecords = salaryAcctRecords.stream().filter(salaryAcctRecordPO -> Objects.equals(salaryAcctRecordPO.getStatus(), SalaryAcctRecordStatusEnum.ARCHIVED.getValue())).collect(Collectors.toList());
|
||||
// 无已归档的薪资核算记录,不允许生成个税申报表
|
||||
if (CollectionUtils.isEmpty(archivedSalaryAcctRecords)) {
|
||||
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(177860, "{0}无可申报数据").replace("{0}", saveParam.getSalaryMonth().toString()));
|
||||
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(177860, "{0}无可申报数据").replace("{0}", SalaryDateUtil.getFormatYearMonth(saveParam.getSalaryMonth())));
|
||||
}
|
||||
// 查询已归档的薪资核算记录是否已经生成过个税申报表
|
||||
Map<Date, List<SalaryAcctTaxAgentPO>> taxCycleKeySalaryAcctTaxAgentMap = SalaryEntityUtil.group2Map(salaryAcctTaxAgents, SalaryAcctTaxAgentPO::getTaxCycle);
|
||||
|
|
@ -607,7 +611,7 @@ public class TaxDeclareRecordServiceImpl extends Service implements TaxDeclareRe
|
|||
// 注册的企业信息-->请求参数
|
||||
Map<String, Object> requestParam = taxDeclareRequest.getRequestParam();
|
||||
// 税款所属期
|
||||
requestParam.put("skssq", SalaryDateUtil.getFormatYearMonth(taxDeclareRecord.getTaxCycle()));
|
||||
requestParam.put("skssq", SalaryDateUtil.getFormatYYYYMM(taxDeclareRecord.getTaxCycle()));
|
||||
// 人员列表
|
||||
List<Map<String, Object>> employeeDeclareParam = EmployeeDeclareRequest.convert2RequestParam(employeeDeclares);
|
||||
requestParam.put("rylb", employeeDeclareParam);
|
||||
|
|
@ -791,7 +795,7 @@ public class TaxDeclareRecordServiceImpl extends Service implements TaxDeclareRe
|
|||
// 注册的企业信息-->请求参数
|
||||
Map<String, Object> requestParam = taxDeclareRequest.getRequestParam();
|
||||
// 税款所属期
|
||||
requestParam.put("skssq", SalaryDateUtil.getFormatYearMonth(taxDeclareRecord.getTaxCycle()));
|
||||
requestParam.put("skssq", SalaryDateUtil.getFormatYYYYMM(taxDeclareRecord.getTaxCycle()));
|
||||
// 申报类型
|
||||
requestParam.put("sblx", "1");
|
||||
// 作废银联缴款凭证
|
||||
|
|
@ -896,7 +900,7 @@ public class TaxDeclareRecordServiceImpl extends Service implements TaxDeclareRe
|
|||
// 注册的企业信息-->请求参数
|
||||
Map<String, Object> requestParam = taxDeclareRequest.getRequestParam();
|
||||
// 税款所属期
|
||||
requestParam.put("skssq", SalaryDateUtil.getFormatYearMonth(taxDeclareRecord.getTaxCycle()));
|
||||
requestParam.put("skssq", SalaryDateUtil.getFormatYYYYMM(taxDeclareRecord.getTaxCycle()));
|
||||
// 申报类型
|
||||
requestParam.put("sblx", "1");
|
||||
// 请求
|
||||
|
|
@ -941,7 +945,7 @@ public class TaxDeclareRecordServiceImpl extends Service implements TaxDeclareRe
|
|||
TaxDeclareRecordPO taxDeclareRecord = taxDeclareRequest.getTaxDeclareRecord();
|
||||
Map<String, Object> requestParam = taxDeclareRequest.getRequestParam();
|
||||
// 税款所属期
|
||||
requestParam.put("skssq", SalaryDateUtil.getFormatYearMonth(taxDeclareRecord.getTaxCycle()));
|
||||
requestParam.put("skssq", SalaryDateUtil.getFormatYYYYMM(taxDeclareRecord.getTaxCycle()));
|
||||
// 申报类型
|
||||
requestParam.put("sblx", "1");
|
||||
// 请求
|
||||
|
|
@ -961,7 +965,7 @@ public class TaxDeclareRecordServiceImpl extends Service implements TaxDeclareRe
|
|||
TaxDeclareRecordPO taxDeclareRecord = taxDeclareRequest.getTaxDeclareRecord();
|
||||
Map<String, Object> requestParam = taxDeclareRequest.getRequestParam();
|
||||
// 税款所属期
|
||||
requestParam.put("skssq", SalaryDateUtil.getFormatYearMonth(taxDeclareRecord.getTaxCycle()));
|
||||
requestParam.put("skssq", SalaryDateUtil.getFormatYYYYMM(taxDeclareRecord.getTaxCycle()));
|
||||
// 报表类型
|
||||
requestParam.put("reportType", "1");
|
||||
// 页码
|
||||
|
|
|
|||
|
|
@ -103,6 +103,19 @@ public class SalaryDateUtil {
|
|||
}
|
||||
}
|
||||
|
||||
public static String getFormatYYYYMM(Date localDate) {
|
||||
if (localDate == null) {
|
||||
return StringUtils.EMPTY;
|
||||
}
|
||||
try {
|
||||
SimpleDateFormat simpleDateFormat = new SimpleDateFormat(MONTH_FORMATTER_PATTERN);
|
||||
return simpleDateFormat.format(localDate).replace("-", "");
|
||||
} catch (Exception e) {
|
||||
log.warn("格式化月份错误", e);
|
||||
return StringUtils.EMPTY;
|
||||
}
|
||||
}
|
||||
|
||||
public static String getFormatLocalDate(LocalDate localDate) {
|
||||
if (localDate == null) {
|
||||
return StringUtils.EMPTY;
|
||||
|
|
|
|||
|
|
@ -428,7 +428,7 @@ public class EmployeeDeclareWrapper extends Service {
|
|||
.setFinish(false)
|
||||
.setMsg("");
|
||||
|
||||
Util_DataCache.setObjVal(SalaryCacheKey.EMPLOYEE_DECLARE + "-" + employeeDeclareRate.getIndex(), employeeDeclareRate);
|
||||
Util_DataCache.setObjVal(SalaryCacheKey.EMPLOYEE_DECLARE + employeeDeclareRate.getIndex(), employeeDeclareRate);
|
||||
LocalRunnable localRunnable = new LocalRunnable() {
|
||||
@Override
|
||||
public void execute() {
|
||||
|
|
@ -439,7 +439,7 @@ public class EmployeeDeclareWrapper extends Service {
|
|||
log.error("刷新数据失败:{}", e.getMessage(), e);
|
||||
employeeDeclareRate.setStatus(false).setFinish(true).setMsg(e.getMessage());
|
||||
} finally {
|
||||
Util_DataCache.setObjVal(SalaryCacheKey.EMPLOYEE_DECLARE + "-" + employeeDeclareRate.getIndex(), employeeDeclareRate);
|
||||
Util_DataCache.setObjVal(SalaryCacheKey.EMPLOYEE_DECLARE + employeeDeclareRate.getIndex(), employeeDeclareRate);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue