|
|
@@ -426,8 +426,6 @@ public class ExpenseAccountServiceImpl extends BaseMybatisDao<ExpenseAccountMapp
|
|
|
updateSon.setStatus(2);
|
|
|
expenseAccountMapper.updateByPrimaryKeySelective(updateSon);
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
}else if (newEa.getStatus()==1){
|
|
|
if (newEa.getProcessStatus()==EAProcessStatus.CWSH.getCode()){
|
|
|
pushFinanceCount(admin.getDepFinance(),useEa.getCreateTime(),0);
|
|
|
@@ -465,6 +463,7 @@ public class ExpenseAccountServiceImpl extends BaseMybatisDao<ExpenseAccountMapp
|
|
|
//审核处理审核表
|
|
|
pushExpenseAccountExamine(in);
|
|
|
expenseAccountMapper.updateByPrimaryKeySelective(newEa);
|
|
|
+ expenseAccountMapper.updateSonByMainId(newEa.getId());
|
|
|
return 1;
|
|
|
}
|
|
|
|
|
|
@@ -1015,6 +1014,9 @@ public class ExpenseAccountServiceImpl extends BaseMybatisDao<ExpenseAccountMapp
|
|
|
TokenManager.hasRole(AFTConstants.VICE_CEO)|| TokenManager.hasRole(AFTConstants.APPROVAL_DECISION)){
|
|
|
//财务管理员和超级管理员查看全部
|
|
|
in.setProcessStatus(6);
|
|
|
+ }else if (TokenManager.hasRole(AFTConstants.FINANCE)){
|
|
|
+ //0 设置为财务查看
|
|
|
+ param.put("roleType",0);
|
|
|
}
|
|
|
if (in.getAid()!=null){
|
|
|
param.put("aid",in.getAid());
|
|
|
@@ -1063,12 +1065,12 @@ public class ExpenseAccountServiceImpl extends BaseMybatisDao<ExpenseAccountMapp
|
|
|
|
|
|
|
|
|
@Override
|
|
|
- @Cacheable(value = "expenseAccountStatistics#300", key = "'page:'+#name+',depId'+#depId+',startTime'+#startTime+',endTime'+#endTime")
|
|
|
- public List<OutExpenseAccountStatistics> statistics(String name,String depId,String startTime,String endTime) {
|
|
|
- if (endTime!=null)endTime=endTime+" 23:59:59";
|
|
|
- List<OutMyEAStatistics> list = expenseAccountMapper.selectStatistics(name, depId, startTime, endTime);
|
|
|
- List<OutExpenseAccountStatistics> results=new ArrayList<>();
|
|
|
- Map<String ,Object> map=new HashMap<>();
|
|
|
+ @Cacheable(value = "expenseAccountStatistics#300", key = "'page:'+#name+',depId'+#depId+',startTime'+#startTime+',endTime'+#endTime+'lander'+#lander")
|
|
|
+ public List<OutExpenseAccountStatistics> statistics(String name,String depId,String startTime,String endTime,String lander) {
|
|
|
+ if (endTime != null) endTime = endTime + " 23:59:59";
|
|
|
+ List<OutMyEAStatistics> list = expenseAccountMapper.selectStatistics(name, depId, startTime, endTime, lander);
|
|
|
+ List<OutExpenseAccountStatistics> results = new ArrayList<>();
|
|
|
+ Map<String, Object> map = new HashMap<>();
|
|
|
for (OutMyEAStatistics e : list) {
|
|
|
OutExpenseAccountStatistics out = new OutExpenseAccountStatistics(e.getAid());
|
|
|
out.setAname(e.getAname());
|
|
|
@@ -1100,35 +1102,35 @@ public class ExpenseAccountServiceImpl extends BaseMybatisDao<ExpenseAccountMapp
|
|
|
out.setBhs(1);
|
|
|
}
|
|
|
//如果不存在就新增
|
|
|
- if (!map.keySet().contains(out.getAid())){
|
|
|
- List<OutExpenseAccountStatistics> list2=new ArrayList<>();
|
|
|
+ if (!map.keySet().contains(out.getAid())) {
|
|
|
+ List<OutExpenseAccountStatistics> list2 = new ArrayList<>();
|
|
|
list2.add(out);
|
|
|
- map.put(out.getAid(),list2);
|
|
|
- }else {
|
|
|
+ map.put(out.getAid(), list2);
|
|
|
+ } else {
|
|
|
List<OutExpenseAccountStatistics> list2 = (List<OutExpenseAccountStatistics>) map.get(e.getAid());
|
|
|
list2.add(out);
|
|
|
}
|
|
|
}
|
|
|
for (String s : map.keySet()) {
|
|
|
List<OutExpenseAccountStatistics> list3 = (List<OutExpenseAccountStatistics>) map.get(s);
|
|
|
- if (!list3.isEmpty()){
|
|
|
- OutExpenseAccountStatistics out =new OutExpenseAccountStatistics(s);
|
|
|
+ if (!list3.isEmpty()) {
|
|
|
+ OutExpenseAccountStatistics out = new OutExpenseAccountStatistics(s);
|
|
|
|
|
|
for (OutExpenseAccountStatistics e : list3) {
|
|
|
- if (out.getAname()==null)out.setAname(e.getAname());
|
|
|
- if (e.getBx()!=null)out.setBx(out.getBx()+e.getBx());
|
|
|
- if (e.getJz()!=null)out.setJz(out.getJz()+e.getJz());
|
|
|
- if (e.getDk()!=null)out.setDk(out.getDk()+e.getDk());
|
|
|
- if (e.getBxAmount()!=null)out.setBxAmount(out.getBxAmount().add(e.getBxAmount()));
|
|
|
- if (e.getJzAmount()!=null)out.setJzAmount(out.getJzAmount().add(e.getJzAmount()));
|
|
|
- if (e.getDkAmount()!=null)out.setDkAmount(out.getDkAmount().add(e.getDkAmount()));
|
|
|
- if (e.getGdfyAmount()!=null)out.setGdfyAmount(out.getGdfyAmount().add(e.getGdfyAmount()));
|
|
|
- if (e.getBxddAmount()!=null)out.setBxddAmount(out.getBxddAmount().add(e.getBxddAmount()));
|
|
|
- if (e.getWshs()!=null)out.setWshs(out.getWshs()+e.getWshs());
|
|
|
- if (e.getBhs()!=null)out.setBhs(out.getBhs()+e.getBhs());
|
|
|
+ if (out.getAname() == null) out.setAname(e.getAname());
|
|
|
+ if (e.getBx() != null) out.setBx(out.getBx() + e.getBx());
|
|
|
+ if (e.getJz() != null) out.setJz(out.getJz() + e.getJz());
|
|
|
+ if (e.getDk() != null) out.setDk(out.getDk() + e.getDk());
|
|
|
+ if (e.getBxAmount() != null) out.setBxAmount(out.getBxAmount().add(e.getBxAmount()));
|
|
|
+ if (e.getJzAmount() != null) out.setJzAmount(out.getJzAmount().add(e.getJzAmount()));
|
|
|
+ if (e.getDkAmount() != null) out.setDkAmount(out.getDkAmount().add(e.getDkAmount()));
|
|
|
+ if (e.getGdfyAmount() != null) out.setGdfyAmount(out.getGdfyAmount().add(e.getGdfyAmount()));
|
|
|
+ if (e.getBxddAmount() != null) out.setBxddAmount(out.getBxddAmount().add(e.getBxddAmount()));
|
|
|
+ if (e.getWshs() != null) out.setWshs(out.getWshs() + e.getWshs());
|
|
|
+ if (e.getBhs() != null) out.setBhs(out.getBhs() + e.getBhs());
|
|
|
}
|
|
|
- BigDecimal totalAmount=new BigDecimal(0);
|
|
|
- totalAmount=totalAmount.add(out.getBxAmount()).add(out.getJzAmount()).subtract(out.getDkAmount());
|
|
|
+ BigDecimal totalAmount = new BigDecimal(0);
|
|
|
+ totalAmount = totalAmount.add(out.getBxAmount()).add(out.getJzAmount()).subtract(out.getDkAmount());
|
|
|
out.setTotalAmount(totalAmount);
|
|
|
results.add(out);
|
|
|
}
|