|
|
@@ -367,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);
|