|
|
@@ -277,8 +277,13 @@ public class ExpenseAccountServiceImpl extends BaseMybatisDao<ExpenseAccountMapp
|
|
|
realAmount=realAmount.add(e.getRealAmount());
|
|
|
}
|
|
|
in.setTotalAmount(totalAmount);
|
|
|
- in.setAmount(realAmount.subtract(useEA.getSettlementAmount()));
|
|
|
+ if (useEA==null||useEA.getSettlementAmount()==null){
|
|
|
+ in.setAmount(realAmount);
|
|
|
+ }else {
|
|
|
+ in.setAmount(realAmount.subtract(useEA.getSettlementAmount()));
|
|
|
+ }
|
|
|
in.setRealAmount(in.getAmount());
|
|
|
+
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
@@ -315,13 +320,6 @@ public class ExpenseAccountServiceImpl extends BaseMybatisDao<ExpenseAccountMapp
|
|
|
public Object pageListExport(InputPageListBo in) {
|
|
|
List<OutExpenseAccountBo> list = (List<OutExpenseAccountBo>) pageList(in).getList();
|
|
|
for (OutExpenseAccountBo e : list) {
|
|
|
- if (e.getTargetType()!=null){
|
|
|
- if (e.getTargetType()==0){
|
|
|
- e.setTargetName("固定费用");
|
|
|
- }else {
|
|
|
- e.setTargetName(e.getContractNo()+"-"+e.getBuyerName());
|
|
|
- }
|
|
|
- }
|
|
|
if (e.getType()!=0){
|
|
|
e.setTypeOther(EATypes.getDescByCode(e.getType()));
|
|
|
}else{
|
|
|
@@ -340,7 +338,7 @@ public class ExpenseAccountServiceImpl extends BaseMybatisDao<ExpenseAccountMapp
|
|
|
if (e.getTargetType()==0){
|
|
|
e.setTargetName("固定费用");
|
|
|
}else {
|
|
|
- e.setTargetName(e.getContractNo()+"-"+e.getBuyerName());
|
|
|
+ e.setTargetName(e.getContractNo()+"/"+e.getBuyerName());
|
|
|
}
|
|
|
}
|
|
|
if (e.getType()!=0){
|
|
|
@@ -369,6 +367,34 @@ public class ExpenseAccountServiceImpl extends BaseMybatisDao<ExpenseAccountMapp
|
|
|
return organizationListOut;
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public Object updateTypeOther(Integer id, String typeOther) {
|
|
|
+ ExpenseAccount ea = new ExpenseAccount();
|
|
|
+ ea.setId(id);
|
|
|
+ ea.setTypeOther(typeOther);
|
|
|
+ expenseAccountMapper.updateByPrimaryKeySelective(ea);
|
|
|
+ MainExpenseAccount mainExpenseAccount = expenseAccountMapper.selectbySonId(id);
|
|
|
+ StringBuffer types=new StringBuffer();
|
|
|
+ for (SonExpenseAccount e : mainExpenseAccount.getSonList()) {
|
|
|
+ if (e.getType()!=0){
|
|
|
+ types=types.append(EATypes.getDescByCode(e.getType()));
|
|
|
+ }else {
|
|
|
+ types=types.append(e.getTypeOther());
|
|
|
+ }
|
|
|
+ if (e.getType()==2){
|
|
|
+ if (e.getSecondaryType()==0){
|
|
|
+ types=types.append("-").append(e.getSecondaryTypeOther());
|
|
|
+ }else{
|
|
|
+ String descByCode = EAsecondaryTypes.getDescByCode(e.getSecondaryType());
|
|
|
+ types=types.append("-").append(descByCode);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ types=types.append(",");
|
|
|
+ }
|
|
|
+ expenseAccountMapper.updateSonTypeOther(id,types.substring(0,types.length()-1));
|
|
|
+ return 1;
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
private void pushResettingDebit(InputExpenseAccount in, Integer debitId) {
|
|
|
ExpenseAccount debit = expenseAccountMapper.selectByPrimaryKey(debitId);
|
|
|
@@ -945,6 +971,7 @@ public class ExpenseAccountServiceImpl extends BaseMybatisDao<ExpenseAccountMapp
|
|
|
Integer noticeStatus=NoticeStatus.EXPENSE_NOTICE.getCode();
|
|
|
if (status==2){
|
|
|
noticeStatus=NoticeStatus.EXPENSE_COMPLETE.getCode();
|
|
|
+ str="您提交的费用报销单已通过审核,请及时查看。";
|
|
|
}
|
|
|
List<Notice> list=new ArrayList<>();
|
|
|
if (aids!=null){
|
|
|
@@ -1118,6 +1145,7 @@ public class ExpenseAccountServiceImpl extends BaseMybatisDao<ExpenseAccountMapp
|
|
|
update.setId(in.getId());
|
|
|
update.setExamineName(outExpenseAccount.getExamineName());
|
|
|
expenseAccountMapper.updateByPrimaryKeySelective(update);
|
|
|
+// expenseAccountMapper.updateByOrderRemarks(in.getId());
|
|
|
}else if (in.getStatus()==4){
|
|
|
expenseAccountMapper.updateByMainId(in.getId(),0);
|
|
|
addExpenseAccountLog(in.getId(),4,0,TokenManager.getAdminId(),"撤销报销审核");
|