|
@@ -1011,23 +1011,24 @@ public class SalaryManagementServiceImpl extends ServiceImpl<SalaryManagementMap
|
|
|
List<SalaryManagementHoliday> holidayListNBSY = new ArrayList<>();//宁波森语
|
|
|
List<SalaryManagementHoliday> holidayListZZ = new ArrayList<>();//正织
|
|
|
|
|
|
- QueryWrapper<SalaryAttendanceHoliday> queryWrapper = new QueryWrapper<>();
|
|
|
- queryWrapper.eq("del_flag", "0");
|
|
|
- queryWrapper.like("year_with_month", yearWith + "%");
|
|
|
- List<SalaryAttendanceHoliday> list = salaryAttendanceHolidayMapper.selectList(queryWrapper);
|
|
|
+// QueryWrapper<SalaryAttendanceHoliday> queryWrapper = new QueryWrapper<>();
|
|
|
+// queryWrapper.eq("del_flag", "0");
|
|
|
+// queryWrapper.like("year_with_month", yearWith + "%");
|
|
|
+// List<SalaryAttendanceHoliday> list = salaryAttendanceHolidayMapper.selectList(queryWrapper);
|
|
|
+ List<SalaryAttendanceHoliday> list = salaryAttendanceHolidayMapper.selectListByYear(yearWith);
|
|
|
|
|
|
if (list.size() < 1) {
|
|
|
return Result.error("执行失败,没有找到" + yearWith + "的年休数据!");
|
|
|
}
|
|
|
|
|
|
- String salaryBase = salaryChangeRecordMapper.selectSalary();
|
|
|
- if (StringUtils.isBlank(salaryBase)) {
|
|
|
- return Result.error("计算失败,工资基数异常!");
|
|
|
- }
|
|
|
-
|
|
|
- String salaryBaseText = AesEncryptUtil.desEncrypt(salaryBase).trim();
|
|
|
-
|
|
|
- BigDecimal salaryBaseBig = new BigDecimal(salaryBaseText);
|
|
|
+// String salaryBase = salaryChangeRecordMapper.selectSalary();
|
|
|
+// if (StringUtils.isBlank(salaryBase)) {
|
|
|
+// return Result.error("计算失败,工资基数异常!");
|
|
|
+// }
|
|
|
+//
|
|
|
+// String salaryBaseText = AesEncryptUtil.desEncrypt(salaryBase).trim();
|
|
|
+//
|
|
|
+// BigDecimal salaryBaseBig = new BigDecimal(salaryBaseText);
|
|
|
|
|
|
for (SalaryAttendanceHoliday o : list) {
|
|
|
|
|
@@ -1061,7 +1062,23 @@ public class SalaryManagementServiceImpl extends ServiceImpl<SalaryManagementMap
|
|
|
|
|
|
//应发薪资 = 基本薪资/(单休26,双休22)*剩余年休
|
|
|
BigDecimal wages = new BigDecimal("0");
|
|
|
- wages = salaryBaseBig.divide(workingHours, 12, BigDecimal.ROUND_HALF_UP).multiply(surplus).setScale(2, BigDecimal.ROUND_HALF_UP);;
|
|
|
+// wages = salaryBaseBig.divide(workingHours, 12, BigDecimal.ROUND_HALF_UP).multiply(surplus).setScale(2, BigDecimal.ROUND_HALF_UP);;
|
|
|
+
|
|
|
+ String adjustment = o.getAdjustment();
|
|
|
+ BigDecimal adjustmentBig = new BigDecimal("0");
|
|
|
+ if(StringUtils.isNotBlank(adjustment)){
|
|
|
+ try {
|
|
|
+ adjustmentBig = new BigDecimal(AesEncryptUtil.desEncrypt(adjustment).trim());
|
|
|
+ }catch (Exception e){
|
|
|
+ return Result.error(o.getName()+"基本薪资异常,请查看!");
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ return Result.error(o.getName()+"基本薪资为空,请维护!");
|
|
|
+ }
|
|
|
+
|
|
|
+ //2025-3-12 王仕洋 提供年休新算法
|
|
|
+ //年休的薪资 = 个人薪资/(单休26,双休22)*剩余年休天数 *(2)双倍工资
|
|
|
+ wages = adjustmentBig.divide(workingHours, 12, BigDecimal.ROUND_HALF_UP).multiply(surplus).multiply(new BigDecimal("2")).setScale(2, BigDecimal.ROUND_HALF_UP);;
|
|
|
String wagesText = AesEncryptUtil.encrypt(wages.toString()).trim();
|
|
|
salaryManagementHoliday.setWages(wagesText);//应发薪资
|
|
|
salaryManagementHoliday.setPayTaxes(wagesText);//应纳税所得额
|
|
@@ -1957,7 +1974,7 @@ public class SalaryManagementServiceImpl extends ServiceImpl<SalaryManagementMap
|
|
|
if (salaryAttendanceDetailListZZ != null && salaryAttendanceDetailListZZ.size() > 0) {
|
|
|
|
|
|
int num = 0;
|
|
|
- for (SalaryManagementDetail o : salaryAttendanceDetailListNBSY) {
|
|
|
+ for (SalaryManagementDetail o : salaryAttendanceDetailListZZ) {
|
|
|
if(!o.getActualOccurrence().equals("nghotxDTNyeHgH0mlfbJig==") && !o.getActualOccurrence().equals("HV3ndEx8HV9kd1WNbxLgwg==")){
|
|
|
num ++;
|
|
|
}
|