Merge branch 'release/个税版本' into custom/艾志工业

This commit is contained in:
钱涛 2025-03-05 17:18:49 +08:00
commit e0a686f776
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 org.apache.ibatis.annotations.Param;
import java.util.Date;
import java.util.List;
@ -70,5 +71,5 @@ public interface OtherDeductionMapper {
*/
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
</delete>
<select id="getByTaxAgentIdAndEmployeeId" resultMap="BaseResultMap">
<select id="getByTaxAgentIdAndEmployeeIdAndDeclareMonth" resultMap="BaseResultMap">
SELECT
<include refid="baseColumns"/>
FROM hrsa_other_deduction t
WHERE delete_type = 0
AND tax_agent_id = #{taxAgentId}
AND employee_id = #{employeeId}
AND declare_month = #{declareMonth}
</select>

View File

@ -763,7 +763,7 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction
// 错误excel内容
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++) {
EndowmentInsuranceListDTO dto = derateDeductionList.get(i);
@ -1510,7 +1510,7 @@ public class OtherDeductionServiceImpl extends Service implements OtherDeduction
po.handleList();
//清除旧数据
OtherDeductionPO otherDeductionPO = getOtherDeductionMapper().getByTaxAgentIdAndEmployeeId(po.getTaxAgentId(), po.getEmployeeId());
OtherDeductionPO otherDeductionPO = getOtherDeductionMapper().getByTaxAgentIdAndEmployeeIdAndDeclareMonth(po.getTaxAgentId(), po.getEmployeeId(), po.getDeclareMonth());
if (otherDeductionPO != null) {
getOtherDeductionMapper().delete(otherDeductionPO);
getFreeIncomeMapper().deleteByMainId(otherDeductionPO.getId());