Commit aafc35f6 authored by hongguangwu's avatar hongguangwu

优化RED_DATA

parent 1dba38d2
...@@ -264,6 +264,11 @@ public class SalaryAccountUtil implements Serializable { ...@@ -264,6 +264,11 @@ public class SalaryAccountUtil implements Serializable {
sai.setSalaryMoney(cellValueBig); sai.setSalaryMoney(cellValueBig);
} }
} catch (NumberFormatException e) { } catch (NumberFormatException e) {
if (cellValueStr.length() > 500) {
errorFlag = false;
errorList.add(new ErrorMessage((i + 2), "文本超长!"));
continue;
}
sai.setTextValue(cellValueStr); sai.setTextValue(cellValueStr);
} }
saiList.add(sai); saiList.add(sai);
......
...@@ -275,14 +275,31 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl ...@@ -275,14 +275,31 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
TIncome income = new TIncome(); TIncome income = new TIncome();
income.setEmpIdcard(tIncomeDetail.getEmpIdcard()); income.setEmpIdcard(tIncomeDetail.getEmpIdcard());
income.setDeptId(tIncomeDetail.getDeptId()); income.setDeptId(tIncomeDetail.getDeptId());
income.setPayMonth(tIncomeDetail.getPayMonth());
List<TIncome> incomeList = baseMapper.getTIncomeList(income); List<TIncome> incomeList = baseMapper.getTIncomeList(income);
// 不存在,直接新增
if (incomeList == null || incomeList.isEmpty()) { if (incomeList == null || incomeList.isEmpty()) {
BeanUtil.copyProperties(tIncomeDetail, income); return this.saveIncome(tIncomeDetail);
income.setPushStatus(CommonConstants.ZERO_STRING); } else {
// 核心判断
return this.copyCore(tIncomeDetail, incomeList);
} }
}
// 复制并保存
private boolean saveIncome(TIncomeDetail tIncomeDetail) {
TIncome income = new TIncome();
BeanUtil.copyProperties(tIncomeDetail, income);
income.setPushStatus(CommonConstants.ZERO_STRING);
return this.save(income);
}
private boolean copyCore(TIncomeDetail tIncomeDetail, List<TIncome> incomeList) {
// 判断
if (CommonConstants.TWO_STRING.equals(tIncomeDetail.getFeeMode())) {
return true; }
return false;
} }
} }
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