其他免税扣除导入bug

This commit is contained in:
Harryxzy 2025-03-05 15:06:01 +08:00
parent a8dc1d4010
commit 671e2dd2da
3 changed files with 6 additions and 4 deletions

View File

@ -6,6 +6,7 @@ import com.engine.salary.entity.datacollection.param.OtherDeductionQueryParam;
import com.engine.salary.entity.datacollection.po.OtherDeductionPO; import com.engine.salary.entity.datacollection.po.OtherDeductionPO;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import java.util.Date;
import java.util.List; import java.util.List;
@ -70,5 +71,5 @@ public interface OtherDeductionMapper {
*/ */
int delete(OtherDeductionPO otherDeduction); int delete(OtherDeductionPO otherDeduction);
OtherDeductionPO getByTaxAgentIdAndEmployeeId(@Param("taxAgentId") Long taxAgentId, @Param("employeeId") Long employeeId); OtherDeductionPO getByTaxAgentIdAndEmployeeIdAndDeclareMonth(@Param("taxAgentId") Long taxAgentId, @Param("employeeId") Long employeeId, @Param("declareMonth") Date declareMonth);
} }

View File

@ -59,13 +59,14 @@
WHERE id = #{id} AND delete_type = 0 WHERE id = #{id} AND delete_type = 0
</delete> </delete>
<select id="getByTaxAgentIdAndEmployeeId" resultMap="BaseResultMap"> <select id="getByTaxAgentIdAndEmployeeIdAndDeclareMonth" resultMap="BaseResultMap">
SELECT SELECT
<include refid="baseColumns"/> <include refid="baseColumns"/>
FROM hrsa_other_deduction t FROM hrsa_other_deduction t
WHERE delete_type = 0 WHERE delete_type = 0
AND tax_agent_id = #{taxAgentId} AND tax_agent_id = #{taxAgentId}
AND employee_id = #{employeeId} AND employee_id = #{employeeId}
AND declare_month = #{declareMonth}
</select> </select>

View File

@ -763,7 +763,7 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction
// 错误excel内容 // 错误excel内容
List<Map> errorData = new ArrayList<>(); List<Map> errorData = new ArrayList<>();
List<EndowmentInsuranceListDTO> derateDeductionList = ExcelParseHelper.parse2Map(fileInputStream, EndowmentInsuranceListDTO.class, 2, 1, 12, "OtherDeductionTemplate.xlsx"); List<EndowmentInsuranceListDTO> derateDeductionList = ExcelParseHelper.parse2Map(fileInputStream, EndowmentInsuranceListDTO.class, 2, 1, 11, "OtherDeductionTemplate.xlsx");
for (int i = 0; i < derateDeductionList.size(); i++) { for (int i = 0; i < derateDeductionList.size(); i++) {
EndowmentInsuranceListDTO dto = derateDeductionList.get(i); EndowmentInsuranceListDTO dto = derateDeductionList.get(i);
@ -1510,7 +1510,7 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction
po.handleList(); po.handleList();
//清除旧数据 //清除旧数据
OtherDeductionPO otherDeductionPO = getOtherDeductionMapper().getByTaxAgentIdAndEmployeeId(po.getTaxAgentId(), po.getEmployeeId()); OtherDeductionPO otherDeductionPO = getOtherDeductionMapper().getByTaxAgentIdAndEmployeeIdAndDeclareMonth(po.getTaxAgentId(), po.getEmployeeId(), po.getDeclareMonth());
if (otherDeductionPO != null) { if (otherDeductionPO != null) {
getOtherDeductionMapper().delete(otherDeductionPO); getOtherDeductionMapper().delete(otherDeductionPO);
getFreeIncomeMapper().deleteByMainId(otherDeductionPO.getId()); getFreeIncomeMapper().deleteByMainId(otherDeductionPO.getId());