|
@@ -530,7 +530,7 @@ public class SalaryManagementServiceImpl extends ServiceImpl<SalaryManagementMap
|
|
|
String yearWith = salaryManagement.getYearWith();
|
|
|
|
|
|
if (StringUtils.isBlank(yearWithMonth)) {
|
|
|
- yearWithMonth = "2024-12-12";
|
|
|
+ yearWithMonth = "2025-12-12";
|
|
|
}
|
|
|
String withMonth = yearWithMonth.substring(0, 4);
|
|
|
|
|
@@ -618,6 +618,8 @@ public class SalaryManagementServiceImpl extends ServiceImpl<SalaryManagementMap
|
|
|
BigDecimal Tax045 = new BigDecimal("0.45");
|
|
|
|
|
|
List<SalaryManagementExtra> extraList = new ArrayList<>();
|
|
|
+ List<SalaryManagementWorkOvertime> jiaBanList = new ArrayList<>();
|
|
|
+ List<SalaryManagementHoliday> nianXiuList = new ArrayList<>();
|
|
|
|
|
|
Map<String,Object> data = new HashMap<>();
|
|
|
data.put("MFY",null);
|
|
@@ -830,6 +832,10 @@ public class SalaryManagementServiceImpl extends ServiceImpl<SalaryManagementMap
|
|
|
if(holidayList.size() > 0){
|
|
|
for(SalaryManagementHoliday detail:holidayList){
|
|
|
|
|
|
+ String calculateDate = detail.getCalculateDate();
|
|
|
+ if(StringUtils.isBlank(calculateDate)){
|
|
|
+ nianXiuList.add(detail);
|
|
|
+ }
|
|
|
BigDecimal personalTax = detail.getPersonalTax() == null ? BigDecimal.ZERO : detail.getPersonalTax();
|
|
|
cumulativeTax = cumulativeTax.add(personalTax);
|
|
|
|
|
@@ -847,6 +853,12 @@ public class SalaryManagementServiceImpl extends ServiceImpl<SalaryManagementMap
|
|
|
if (cumulativeOvertimeList.size() > 0) {
|
|
|
for (SalaryManagementWorkOvertime detail : cumulativeOvertimeList) {
|
|
|
|
|
|
+ String calculateDate = detail.getCalculateDate();
|
|
|
+ if(StringUtils.isBlank(calculateDate)){
|
|
|
+
|
|
|
+ jiaBanList.add(detail);
|
|
|
+ }
|
|
|
+
|
|
|
BigDecimal personalTax = detail.getPersonalTax() == null ? BigDecimal.ZERO : detail.getPersonalTax();
|
|
|
cumulativeTax = cumulativeTax.add(personalTax);
|
|
|
|
|
@@ -1039,7 +1051,7 @@ public class SalaryManagementServiceImpl extends ServiceImpl<SalaryManagementMap
|
|
|
BigDecimal workingHours = o.getWorkingHours() == null ? new BigDecimal("22") : o.getWorkingHours();
|
|
|
BigDecimal surplus = o.getSurplus() == null ? BigDecimal.ZERO : o.getSurplus();
|
|
|
|
|
|
-
|
|
|
+
|
|
|
|
|
|
|
|
|
|
|
@@ -1093,7 +1105,8 @@ public class SalaryManagementServiceImpl extends ServiceImpl<SalaryManagementMap
|
|
|
List<SalaryManagementDetail> cumulativeList = salaryManagementDetailMapper.selectByUser(userId, newYear, null);
|
|
|
List<SalaryManagementWorkOvertime> cumulativeOvertimeList = salaryManagementWorkOvertimeMapper.selectByUser(userId, newYear, null);
|
|
|
|
|
|
- List<SalaryManagementExtra> extra = salaryManagementExtraMapper.selectByUserCalculate(userId,withMonth,yearWithMonth,"0");
|
|
|
+
|
|
|
+ List<SalaryManagementExtra> extra = salaryManagementExtraMapper.selectByUserCalculate(userId,newYear,yearWithMonth,"0");
|
|
|
|
|
|
if (cumulativeList.size() > 0) {
|
|
|
|
|
@@ -1186,35 +1199,35 @@ public class SalaryManagementServiceImpl extends ServiceImpl<SalaryManagementMap
|
|
|
|
|
|
|
|
|
BigDecimal personalTax = new BigDecimal("0");
|
|
|
- if(cumulative.compareTo(BigDecimal.ZERO) <= 0){
|
|
|
-
|
|
|
- }else{
|
|
|
- if (top36000.compareTo(cumulative) != -1) {
|
|
|
- personalTax = cumulative.multiply(tax003).subtract(cumulativeTax);
|
|
|
- }
|
|
|
- if (top144000.compareTo(cumulative) != -1 && cumulative.compareTo(top36000) == 1) {
|
|
|
- personalTax = cumulative.multiply(Tax01).subtract(new BigDecimal("2520")).subtract(cumulativeTax);
|
|
|
- }
|
|
|
- if (top300000.compareTo(cumulative) != -1 && cumulative.compareTo(top144000) == 1) {
|
|
|
- personalTax = cumulative.multiply(Tax02).subtract(new BigDecimal("16920")).subtract(cumulativeTax);
|
|
|
- }
|
|
|
- if (top420000.compareTo(cumulative) != -1 && cumulative.compareTo(top300000) == 1) {
|
|
|
- personalTax = cumulative.multiply(Tax025).subtract(new BigDecimal("31920")).subtract(cumulativeTax);
|
|
|
- }
|
|
|
- if (top660000.compareTo(cumulative) != -1 && cumulative.compareTo(top420000) == 1) {
|
|
|
- personalTax = cumulative.multiply(Tax03).subtract(new BigDecimal("52920")).subtract(cumulativeTax);
|
|
|
- }
|
|
|
- if (top960000.compareTo(cumulative) != -1 && cumulative.compareTo(top660000) == 1) {
|
|
|
- personalTax = cumulative.multiply(Tax035).subtract(new BigDecimal("85920")).subtract(cumulativeTax);
|
|
|
- }
|
|
|
- if (cumulative.compareTo(top960000) == 1) {
|
|
|
- personalTax = cumulative.multiply(Tax045).subtract(new BigDecimal("181920")).subtract(cumulativeTax);
|
|
|
- }
|
|
|
- if(personalTax.compareTo(new BigDecimal("0")) < 0){
|
|
|
- personalTax = new BigDecimal("0");
|
|
|
- }
|
|
|
- }
|
|
|
- personalTax = personalTax.setScale(2, BigDecimal.ROUND_HALF_UP);
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
salaryManagementHoliday.setPersonalTax(personalTax);
|
|
|
|
|
|
|
|
@@ -1481,37 +1494,37 @@ public class SalaryManagementServiceImpl extends ServiceImpl<SalaryManagementMap
|
|
|
|
|
|
BigDecimal personalTax = new BigDecimal("0");
|
|
|
|
|
|
- if(cumulative.compareTo(BigDecimal.ZERO) <= 0){
|
|
|
-
|
|
|
- }else{
|
|
|
-
|
|
|
- if (top36000.compareTo(cumulative) != -1) {
|
|
|
- personalTax = cumulative.multiply(tax003).subtract(cumulativeTax);
|
|
|
- }
|
|
|
- if (top144000.compareTo(cumulative) != -1 && cumulative.compareTo(top36000) == 1) {
|
|
|
- personalTax = cumulative.multiply(Tax01).subtract(new BigDecimal("2520")).subtract(cumulativeTax);
|
|
|
- }
|
|
|
- if (top300000.compareTo(cumulative) != -1 && cumulative.compareTo(top144000) == 1) {
|
|
|
- personalTax = cumulative.multiply(Tax02).subtract(new BigDecimal("16920")).subtract(cumulativeTax);
|
|
|
- }
|
|
|
- if (top420000.compareTo(cumulative) != -1 && cumulative.compareTo(top300000) == 1) {
|
|
|
- personalTax = cumulative.multiply(Tax025).subtract(new BigDecimal("31920")).subtract(cumulativeTax);
|
|
|
- }
|
|
|
- if (top660000.compareTo(cumulative) != -1 && cumulative.compareTo(top420000) == 1) {
|
|
|
- personalTax = cumulative.multiply(Tax03).subtract(new BigDecimal("52920")).subtract(cumulativeTax);
|
|
|
- }
|
|
|
- if (top960000.compareTo(cumulative) != -1 && cumulative.compareTo(top660000) == 1) {
|
|
|
- personalTax = cumulative.multiply(Tax035).subtract(new BigDecimal("85920")).subtract(cumulativeTax);
|
|
|
- }
|
|
|
- if (cumulative.compareTo(top960000) == 1) {
|
|
|
- personalTax = cumulative.multiply(Tax045).subtract(new BigDecimal("181920")).subtract(cumulativeTax);
|
|
|
- }
|
|
|
- if(personalTax.compareTo(new BigDecimal("0")) < 0){
|
|
|
- personalTax = new BigDecimal("0");
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- personalTax = personalTax.setScale(2, BigDecimal.ROUND_HALF_UP);
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
salaryAttendanceWorkOvertime.setPersonalTax(personalTax);
|
|
|
|
|
|
|
|
@@ -1614,6 +1627,28 @@ public class SalaryManagementServiceImpl extends ServiceImpl<SalaryManagementMap
|
|
|
salaryManagementExtraMapper.updateById(e);
|
|
|
}
|
|
|
}
|
|
|
+ if(jiaBanList.size() > 0){
|
|
|
+ for(SalaryManagementWorkOvertime e:jiaBanList){
|
|
|
+ if(StringUtils.isNotBlank(yearWithMonth)){
|
|
|
+ e.setCalculateDate(yearWithMonth);
|
|
|
+ }else{
|
|
|
+ e.setCalculateDate(yearWith);
|
|
|
+ }
|
|
|
+ e.setActionLog(DateUtils.now()+"计入工资单:"+type+"年度:"+yearWith+"年月:"+yearWithMonth);
|
|
|
+ salaryManagementWorkOvertimeMapper.updateById(e);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(nianXiuList.size() > 0){
|
|
|
+ for(SalaryManagementHoliday e:nianXiuList){
|
|
|
+ if(StringUtils.isNotBlank(yearWithMonth)){
|
|
|
+ e.setCalculateDate(yearWithMonth);
|
|
|
+ }else{
|
|
|
+ e.setCalculateDate(yearWith);
|
|
|
+ }
|
|
|
+ e.setActionLog(DateUtils.now()+"计入工资单:"+type+"年度:"+yearWith+"年月:"+yearWithMonth);
|
|
|
+ salaryManagementHolidayMapper.updateById(e);
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|