减免税额列表和保存接口

This commit is contained in:
钱涛 2024-12-24 10:54:57 +08:00
parent cf253ecfb0
commit 412d3488d1
21 changed files with 183 additions and 24 deletions

View File

@ -0,0 +1,10 @@
ALTER TABLE hrsa_other_deduction ADD (
free_income varchar2(255) NULL
);
/
ALTER TABLE hrsa_other_deduction ADD (
derate_deduction varchar2(255) NULL
);
/

View File

@ -0,0 +1,10 @@
ALTER TABLE hrsa_other_deduction ADD (
free_income varchar2(255) NULL
);
/
ALTER TABLE hrsa_other_deduction ADD (
derate_deduction varchar2(255) NULL
);
/

View File

@ -0,0 +1,10 @@
ALTER TABLE hrsa_other_deduction ADD (
free_income varchar2(255) NULL
);
/
ALTER TABLE hrsa_other_deduction ADD (
derate_deduction varchar2(255) NULL
);
/

View File

@ -0,0 +1,3 @@
ALTER TABLE hrsa_other_deduction
ADD COLUMN free_income varchar(255) ,
ADD COLUMN derate_deduction varchar(255) ;

View File

@ -0,0 +1,9 @@
ALTER TABLE hrsa_other_deduction ADD (
free_income varchar2(255) NULL
)
/
ALTER TABLE hrsa_other_deduction ADD (
derate_deduction varchar2(255) NULL
)
/

View File

@ -0,0 +1,3 @@
ALTER TABLE hrsa_other_deduction ADD COLUMN free_income varchar(255) NULL;
ALTER TABLE hrsa_other_deduction ADD COLUMN derate_deduction varchar(255) NULL;

View File

@ -0,0 +1,5 @@
ALTER TABLE hrsa_other_deduction ADD free_income varchar(255) NULL
GO
ALTER TABLE hrsa_other_deduction ADD derate_deduction varchar(255) NULL
GO

View File

@ -0,0 +1,10 @@
ALTER TABLE hrsa_other_deduction ADD (
free_income varchar2(255) NULL
);
/
ALTER TABLE hrsa_other_deduction ADD (
derate_deduction varchar2(255) NULL
);
/

View File

@ -5,8 +5,6 @@ import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.Date;
/**
* 其他免税扣除-免税收入表单
* <p>Copyright: Copyright (c) 2024</p>
@ -28,14 +26,15 @@ public class FreeIncomeSaveParam {
//主表数据Id
private Long mainId;
//税款所属期
private Date taxYearMonth;
//人员
private Long employeeId;
//个税扣缴义务人
private Long taxAgentId;
// //税款所属期
// @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
// private Date taxYearMonth;
//
// //人员
// private Long employeeId;
//
// //个税扣缴义务人
// private Long taxAgentId;
//免税事项
private String freeItem;

View File

@ -0,0 +1,25 @@
package com.engine.salary.entity.datacollection.param;
import com.engine.salary.common.BaseQueryParam;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* 其他免税扣除附表查询列表
* <p>Copyright: Copyright (c) 2022</p>
* <p>Company: 泛微软件</p>
*
* @author qiantao
* @version 1.0
**/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class OtherDeductionDetailQueryParam extends BaseQueryParam {
private Long id;
}

View File

@ -8,6 +8,7 @@ import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.Collection;
import java.util.Date;
/**
@ -74,4 +75,7 @@ public class DerateDeductionPO{
@ElogTransform(name = "租户key", ignore = true)
private String tenantKey;
//主键id
private Collection<Long> ids;
}

View File

@ -7,6 +7,7 @@ import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.Collection;
import java.util.Date;
/**
@ -83,4 +84,7 @@ public class EndowmentInsurancePO {
@ElogTransform(name = "租户key", ignore = true)
private String tenantKey;
//主键id
private Collection<Long> ids;
}

View File

@ -7,6 +7,7 @@ import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.Collection;
import java.util.Date;
/**
@ -73,4 +74,7 @@ public class FreeIncomePO {
@ElogTransform(name = "租户key", ignore = true)
private String tenantKey;
//主键id
private Collection<Long> ids;
}

View File

@ -7,6 +7,7 @@ import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.Collection;
import java.util.Date;
/**
@ -84,4 +85,7 @@ public class GrantDonationPO {
@ElogTransform(name = "租户key", ignore = true)
private String tenantKey;
//主键id
private Collection<Long> ids;
}

View File

@ -7,6 +7,7 @@ import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.Collection;
import java.util.Date;
/**
@ -78,4 +79,7 @@ public class HealthInsurancePO {
@ElogTransform(name = "租户key", ignore = true)
private String tenantKey;
//主键id
private Collection<Long> ids;
}

View File

@ -7,6 +7,7 @@ import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.Collection;
import java.util.Date;
/**
@ -70,4 +71,7 @@ public class OtherDerateDeductionPO {
@ElogTransform(name = "租户key", ignore = true)
private String tenantKey;
//主键id
private Collection<Long> ids;
}

View File

@ -8,6 +8,7 @@ import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.Collection;
import java.util.Date;
/**
@ -89,4 +90,7 @@ public class PersonalPensionPO{
@ElogTransform(name = "租户key", ignore = true)
private String tenantKey;
//主键id
private Collection<Long> ids;
}

View File

@ -1,5 +1,6 @@
package com.engine.salary.service;
import com.engine.salary.entity.datacollection.dto.FreeIncomeListDTO;
import com.engine.salary.entity.datacollection.dto.OtherDeductionListDTO;
import com.engine.salary.entity.datacollection.dto.OtherDeductionRecordDTO;
import com.engine.salary.entity.datacollection.param.*;
@ -125,6 +126,8 @@ public interface OtherDeductionService {
String extendToLastMonth(OtherDeductionExtendLastParam param);
PageInfo<FreeIncomeListDTO> freeIncomeList(OtherDeductionDetailQueryParam param);
/**
* 保存免税收入
* @param param

View File

@ -51,6 +51,7 @@ import org.apache.commons.lang3.Validate;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.util.IOUtils;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import org.springframework.beans.BeanUtils;
import weaver.file.ImageFileManager;
import weaver.general.Util;
import weaver.hrm.User;
@ -2182,14 +2183,17 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction
public void saveFreeIncome(FreeIncomeSaveParam param) {
Date now = new Date();
Long mainId = param.getMainId();
OtherDeductionPO deductionPO = getOtherDeductionMapper().getById(mainId);
Long id = param.getId();
if (id == null) {
FreeIncomePO po = FreeIncomePO.builder()
.id(id)
.mainId(param.getMainId())
.taxYearMonth(param.getTaxYearMonth())
.employeeId(param.getEmployeeId())
.taxAgentId(param.getTaxAgentId())
.mainId(mainId)
.taxYearMonth(deductionPO.getDeclareMonth())
.employeeId(deductionPO.getEmployeeId())
.taxAgentId(deductionPO.getTaxAgentId())
.freeItem(param.getFreeItem())
.freeProperty(param.getFreeProperty())
.freeAmount(param.getFreeAmount())
@ -2205,9 +2209,9 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction
} else {
FreeIncomePO po = getFreeIncomeMapper().getById(id);
po.setTaxYearMonth(param.getTaxYearMonth());
po.setEmployeeId(param.getEmployeeId());
po.setTaxAgentId(param.getTaxAgentId());
// po.setTaxYearMonth(param.getTaxYearMonth());
// po.setEmployeeId(param.getEmployeeId());
// po.setTaxAgentId(param.getTaxAgentId());
po.setFreeItem(param.getFreeItem());
po.setFreeProperty(param.getFreeProperty());
po.setFreeAmount(param.getFreeAmount());
@ -2218,4 +2222,16 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction
}
}
@Override
public PageInfo<FreeIncomeListDTO> freeIncomeList(OtherDeductionDetailQueryParam param) {
List<FreeIncomePO> freeIncomePOS = getFreeIncomeMapper().listSome(FreeIncomePO.builder().mainId(param.getId()).build());
List<FreeIncomeListDTO> listDTOS = freeIncomePOS.stream().map(po -> {
FreeIncomeListDTO freeIncomeListDTO = new FreeIncomeListDTO();
BeanUtils.copyProperties(po, freeIncomeListDTO);
return freeIncomeListDTO;
}).collect(Collectors.toList());
return SalaryPageUtil.buildPage(param.getCurrent(), param.getPageSize(), listDTOS, FreeIncomeListDTO.class);
}
}

View File

@ -1,6 +1,7 @@
package com.engine.salary.web;
import com.engine.common.util.ServiceUtil;
import com.engine.salary.entity.datacollection.dto.FreeIncomeListDTO;
import com.engine.salary.entity.datacollection.dto.OtherDeductionListDTO;
import com.engine.salary.entity.datacollection.dto.OtherDeductionRecordDTO;
import com.engine.salary.entity.datacollection.param.*;
@ -279,8 +280,8 @@ public class OtherDeductionController {
}
/**
* @description 编辑其他免税扣除
* @return String
* @description 编辑其他免税扣除
* @author Harryxzy
* @date 2022/10/26 9:41
*/
@ -293,8 +294,8 @@ public class OtherDeductionController {
}
/**
* @description 获取其他免税扣除数据
* @return String
* @description 获取其他免税扣除数据
* @author Harryxzy
* @date 2022/10/31 13:42
*/
@ -307,8 +308,8 @@ public class OtherDeductionController {
}
/**
* @description 新建其他免税扣除
* @return String
* @description 新建其他免税扣除
* @author Harryxzy
* @date 2022/10/27 14:41
*/
@ -321,8 +322,8 @@ public class OtherDeductionController {
}
/**
* @description 删除所选其他免税扣除
* @return String
* @description 删除所选其他免税扣除
* @author Harryxzy
* @date 2022/10/27 14:41
*/
@ -335,8 +336,8 @@ public class OtherDeductionController {
}
/**
* @description 一键清空其他免税扣除
* @return null
* @description 一键清空其他免税扣除
* @author Harryxzy
* @date 2022/10/27 15:15
*/
@ -351,9 +352,27 @@ public class OtherDeductionController {
@POST
@Path("/extendToLastMonth")
@Produces(MediaType.APPLICATION_JSON)
public String extendToLastMonth(@Context HttpServletRequest request, @Context HttpServletResponse response,
@RequestBody OtherDeductionExtendLastParam param) {
public String extendToLastMonth(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody OtherDeductionExtendLastParam param) {
User user = HrmUserVarify.getUser(request, response);
return new ResponseResult<OtherDeductionExtendLastParam, String>(user).run(getOtherDeductionWrapper(user)::extendToLastMonth, param);
}
//减免税额列表
@POST
@Path("/freeIncomeList")
@Produces(MediaType.APPLICATION_JSON)
public String detailList(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody OtherDeductionDetailQueryParam param) {
User user = HrmUserVarify.getUser(request, response);
return new ResponseResult<OtherDeductionDetailQueryParam, PageInfo<FreeIncomeListDTO>>(user).run(getOtherDeductionWrapper(user)::freeIncomeList, param);
}
@POST
@Path("/saveFreeIncome")
@Produces(MediaType.APPLICATION_JSON)
public String saveFreeIncome(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody FreeIncomeSaveParam param) {
User user = HrmUserVarify.getUser(request, response);
return new ResponseResult<FreeIncomeSaveParam, String>(user).run(getOtherDeductionWrapper(user)::saveFreeIncome, param);
}
}

View File

@ -6,6 +6,7 @@ import com.api.browser.util.ConditionFactory;
import com.api.browser.util.ConditionType;
import com.engine.common.util.ServiceUtil;
import com.engine.core.impl.Service;
import com.engine.salary.entity.datacollection.dto.FreeIncomeListDTO;
import com.engine.salary.entity.datacollection.dto.OtherDeductionListDTO;
import com.engine.salary.entity.datacollection.dto.OtherDeductionRecordDTO;
import com.engine.salary.entity.datacollection.param.*;
@ -288,4 +289,12 @@ public class OtherDeductionWrapper extends Service {
param.setYearMonthTime(localDate);
return getOtherDeductionService(user).extendToLastMonth(param);
}
public PageInfo<FreeIncomeListDTO> freeIncomeList(OtherDeductionDetailQueryParam param) {
return getOtherDeductionService(user).freeIncomeList(param);
}
public void saveFreeIncome(FreeIncomeSaveParam param) {
getOtherDeductionService(user).saveFreeIncome(param);
}
}