Commit 0443938c authored by zhaji's avatar zhaji

Merge branch 'develop' into feature-zhaji

parents ec3e9b30 b5958210
...@@ -618,7 +618,6 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper, ...@@ -618,7 +618,6 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
//工资应发 //工资应发
if (SalaryConstants.RELAY_SALARY_JAVA.equals(sai.getJavaFiedName())) { if (SalaryConstants.RELAY_SALARY_JAVA.equals(sai.getJavaFiedName())) {
relaySalary = sai.getSalaryMoney(); relaySalary = sai.getSalaryMoney();
relaySalarySum = relaySalarySum.add(sai.getSalaryMoney());
} }
//减除费用 //减除费用
if (SalaryConstants.COST_REDUCTION_JAVA.equals(sai.getJavaFiedName())) { if (SalaryConstants.COST_REDUCTION_JAVA.equals(sai.getJavaFiedName())) {
...@@ -771,7 +770,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper, ...@@ -771,7 +770,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
// 个人实发合计 // 个人实发合计
this.saveNewItems(sai, saiList, SalaryConstants.ACTUAL_SALARY_SUM, this.saveNewItems(sai, saiList, SalaryConstants.ACTUAL_SALARY_SUM,
SalaryConstants.ACTUAL_SALARY_SUM_JAVA, SalaryConstants.ACTUAL_SALARY_SUM_JAVA,
calculation(relaySalary, saiList), CommonConstants.ZERO_INT); calculation(a, relaySalary, saiList), CommonConstants.ZERO_INT);
} }
//计算个人社保、公积金欠款————工资不够扣缴社保的 //计算个人社保、公积金欠款————工资不够扣缴社保的
if (relaySalary.compareTo(personalDebt) == SalaryConstants.LESS_THAN) { if (relaySalary.compareTo(personalDebt) == SalaryConstants.LESS_THAN) {
...@@ -779,6 +778,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper, ...@@ -779,6 +778,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
SalaryConstants.PERSONAL_DEBT_JAVA, relaySalary.subtract(personalDebt), CommonConstants.ZERO_INT); SalaryConstants.PERSONAL_DEBT_JAVA, relaySalary.subtract(personalDebt), CommonConstants.ZERO_INT);
} }
a.setSaiList(saiList); a.setSaiList(saiList);
relaySalarySum = relaySalarySum.add(a.getRelaySalary());
aList.add(a); aList.add(a);
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
...@@ -977,7 +977,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper, ...@@ -977,7 +977,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
* @Date: 2019/10/9 15:14 * @Date: 2019/10/9 15:14
* @return: java.math.BigDecimal * @return: java.math.BigDecimal
**/ **/
private static BigDecimal calculation(BigDecimal realSalary, List<TSalaryAccountItem> saiList) { private static BigDecimal calculation(TSalaryAccount a, BigDecimal realSalary, List<TSalaryAccountItem> saiList) {
// 实际发放工资 = 应发工资合计- // 实际发放工资 = 应发工资合计-
// 个人社保扣缴 -个人公积金扣缴-薪资扣税-年终奖扣税-代扣风险抵押金 // 个人社保扣缴 -个人公积金扣缴-薪资扣税-年终奖扣税-代扣风险抵押金
// -个人其他费用(就是工资表中的其他费用1+其他费用2+其他费用3) -前次个人待补足 -单位补足扣返 // -个人其他费用(就是工资表中的其他费用1+其他费用2+其他费用3) -前次个人待补足 -单位补足扣返
...@@ -1004,11 +1004,11 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper, ...@@ -1004,11 +1004,11 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
} }
} }
sum = realSalary.subtract(sum).setScale(SalaryConstants.PLACES, BigDecimal.ROUND_HALF_UP); sum = realSalary.subtract(sum).setScale(SalaryConstants.PLACES, BigDecimal.ROUND_HALF_UP);
if (sum.compareTo(SalaryConstants.B_ZERO) == SalaryConstants.LESS_THAN) { if (sum.compareTo(SalaryConstants.B_ZERO) < SalaryConstants.EQUAL) {
return SalaryConstants.B_ZERO; sum = SalaryConstants.B_ZERO;
} else {
return sum;
} }
a.setActualSalary(sum);
return sum;
} }
/** /**
......
...@@ -332,10 +332,12 @@ public class SalaryAccountUtil implements Serializable { ...@@ -332,10 +332,12 @@ public class SalaryAccountUtil implements Serializable {
+ CommonConstants.DOWN_LINE_STRING + salaryType + CommonConstants.DOWN_LINE_STRING + relaySalary) != null) { + CommonConstants.DOWN_LINE_STRING + salaryType + CommonConstants.DOWN_LINE_STRING + relaySalary) != null) {
entity.setIsRepeat(CommonConstants.ONE_INT); entity.setIsRepeat(CommonConstants.ONE_INT);
} }
relaySalarySum = BigDecimalUtils.safeAdd(relaySalary, specialMap.get(entity.getEmpIdcard())); if (!CommonConstants.THREE_STRING.equals(salaryType) && !CommonConstants.FOUR_STRING.equals(salaryType)) {
if (money3500.compareTo(relaySalarySum) == CommonConstants.ZERO_INT relaySalarySum = BigDecimalUtils.safeAdd(relaySalary, specialMap.get(entity.getEmpIdcard()));
|| money5000.compareTo(relaySalarySum) == CommonConstants.ZERO_INT) { if (money3500.compareTo(relaySalarySum) == CommonConstants.ZERO_INT
entity.setHaveSpecialFlag(CommonConstants.ONE_INT); || money5000.compareTo(relaySalarySum) == CommonConstants.ZERO_INT) {
entity.setHaveSpecialFlag(CommonConstants.ONE_INT);
}
} }
} }
if (actualSalarySum != null) { if (actualSalarySum != null) {
......
...@@ -269,6 +269,7 @@ ...@@ -269,6 +269,7 @@
left join t_salary_standard s on a.SALARY_FORM_ID = s.id left join t_salary_standard s on a.SALARY_FORM_ID = s.id
left join t_salary_account_item relaySalary on relaySalary.SALARY_ACCOUNT_ID = a.id and relaySalary.JAVA_FIED_NAME='relaySalary' left join t_salary_account_item relaySalary on relaySalary.SALARY_ACCOUNT_ID = a.id and relaySalary.JAVA_FIED_NAME='relaySalary'
where a.DELETE_FLAG = 0 and s.UNIT_ID = #{unitId} and a.SALARY_MONTH = #{salaryMonth} and a.INVOICE_TITLE = #{invoiceTitle} where a.DELETE_FLAG = 0 and s.UNIT_ID = #{unitId} and a.SALARY_MONTH = #{salaryMonth} and a.INVOICE_TITLE = #{invoiceTitle}
and a.FORM_TYPE !='3' and a.FORM_TYPE !='4'
group by a.EMP_IDCARD group by a.EMP_IDCARD
</select> </select>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment