Commit 43b38a58 by zhangxingmin

push

parent 492a2604
......@@ -924,12 +924,12 @@ public class ApiSalaryServiceImpl implements ApiSalaryService {
//创建需要校验的key值
List<String> checkKeys = new ArrayList<>();
for (ApiSalaryBatchAddDTO addDTO : apiSalaryBatchAddDTOList) {
//获取2条汇款明细的发放金额总和
BigDecimal totalAmount = statisticsAmountByBatchAdd(addDTO);
//校验totalAmount和实发金额是否相等
BigDecimal paidAmount = ObjectUtils.defaultIfNull(addDTO.getPaidAmount(), BigDecimal.ZERO);
if (paidAmount.compareTo(totalAmount) != 0){
//汇款明细合计总金额和实发总金额必须相等,记录key值
// 四舍五入保留两位小数后再比较
BigDecimal paidScaled = paidAmount.setScale(2, RoundingMode.HALF_UP);
BigDecimal totalScaled = totalAmount.setScale(2, RoundingMode.HALF_UP);
if (paidScaled.compareTo(totalScaled) != 0) {
String key = addDTO.getBrokerBizId() + "|" + addDTO.getMonth();
checkKeys.add(key);
}
......
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