Commit 288afaa9 authored by hongguangwu's avatar hongguangwu

MVP1.6.3 特殊导入

parent 93e3b20b
...@@ -853,24 +853,26 @@ public class TSalaryStandardOriginalServiceImpl extends ServiceImpl<TSalaryStand ...@@ -853,24 +853,26 @@ public class TSalaryStandardOriginalServiceImpl extends ServiceImpl<TSalaryStand
detail = detailMap.get(column.getKey()); detail = detailMap.get(column.getKey());
if (detail != null && Common.isNotNull(detail.getModelName())) { if (detail != null && Common.isNotNull(detail.getModelName())) {
value = column.getValue(); value = column.getValue();
try { if (Common.isNotNull(value)) {
if ("REDUCE".equals(detail.getFlag())) { try {
value = String.valueOf(new BigDecimal(value).negate()); if ("REDUCE".equals(detail.getFlag())) {
value = String.valueOf(new BigDecimal(value).negate());
}
oldValue = newRowMap.get(detail.getModelName());
if (Common.isNotNull(oldValue)) {
value = String.valueOf(new BigDecimal(oldValue).add(new BigDecimal(value))
.setScale(SalaryConstants.PLACES, BigDecimal.ROUND_HALF_UP));
}
} catch (NumberFormatException e) {
return R.failed("数据行第 " + i + " 行,第 " + (Integer.parseInt(column.getKey()) + 1) + " 列 不是金额,不可以进行加减计算!");
} }
oldValue = newRowMap.get(detail.getModelName()); newRowMap.put(detail.getModelName(), value);
if (oldValue != null) { if (SalaryConstants.ID_NUMBER.equals(detail.getModelName())) {
value = String.valueOf(new BigDecimal(oldValue).add(new BigDecimal(value)) check.setIdCard(value);
.setScale(SalaryConstants.PLACES, BigDecimal.ROUND_HALF_UP)); }
if (SalaryConstants.EMP_NAME2.equals(detail.getModelName())) {
check.setName(value);
} }
} catch (NumberFormatException e) {
return R.failed("数据行第 " + i + " 行,第 " + (Integer.parseInt(column.getKey()) + 1) + " 列 不是金额,不可以进行加减计算!");
}
newRowMap.put(detail.getModelName(), value);
if (SalaryConstants.ID_NUMBER.equals(detail.getModelName())) {
check.setIdCard(value);
}
if (SalaryConstants.EMP_NAME2.equals(detail.getModelName())) {
check.setName(value);
} }
} }
} }
......
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