Commit 29078bcf authored by 刘_震's avatar 刘_震

工资-后端代码实现,如果传过来的含应付工资,就加到工人工资里面

parent 1624e692
......@@ -140,7 +140,7 @@ public class WagesCalculateConversionServiceImpl implements WagesCalculateConver
if (first.isPresent()) {
vo.setLabel(wagesFormulaDto.getLabel());
vo.setDep(first.get().getUnitName());
vo.setWorker(dao.getWorkerWagesPayable().toString());
// vo.setWorker(dao.getWorkerWagesPayable().toString());
vo.setCadre(dao.getCadreWagesPayable().toString());
vo.setC(wagesFormulaDto.getC());
for (String s : formula) {
......@@ -161,7 +161,14 @@ public class WagesCalculateConversionServiceImpl implements WagesCalculateConver
value = StringUtils.replaceOnce(value, s, s);
}
}
vo.setValue(count(value));
// vo.setValue(count(value));
vo.setValue(dao.getTotalWagesPayable().toString());
// 假设 count(value) 返回的是一个字符串,表示一个数值
String countString = count(value);
BigDecimal countValue = BigDecimal.valueOf(Double.parseDouble(countString));
BigDecimal cadreWagesPayable = dao.getCadreWagesPayable();
BigDecimal result = countValue.subtract(cadreWagesPayable);
vo.setWorker(result.toString());
voList.add(vo);
value = value1;
}
......@@ -186,6 +193,7 @@ public class WagesCalculateConversionServiceImpl implements WagesCalculateConver
value = StringUtils.replaceOnce(value, s, fieldValue.toString());
}
vo.setValue(count(value));
voList.add(vo);
value = value1;
}
......@@ -328,4 +336,4 @@ public class WagesCalculateConversionServiceImpl implements WagesCalculateConver
private boolean isOperator(char c) {
return c == '+' || c == '-' || c == '*' || c == '/';
}
}
}
\ No newline at end of file
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