Browse Source

新增获取借支列表接口

anderx 2 years ago
parent
commit
29c6044cc2

+ 15 - 3
src/main/java/com/goafanti/expenseAccount/service/impl/ExpenseAccountServiceImpl.java

@@ -157,14 +157,26 @@ public class ExpenseAccountServiceImpl extends BaseMybatisDao<ExpenseAccountMapp
         if (useEa.getStatus()==0)throw new BusinessException("审核状态错误");
         if (useEa.getProcessStatus()!=in.getProcessStatus())throw new BusinessException(String.format("审核流程错误use=%s",useEa.getProcessStatus()));
         //审核通知 获取发送人
-        addExamineExpenseAccountLog(in, useEa, newEa, in.getStatus());
+        addExamineExpenseAccountLog(in, useEa, newEa);
+        //完成申请
+        if (newEa.getStatus()==2){
+            //如果是借支则订单新增
+
+            if (useEa.getType()==4){
+
+            }else {
+                //不然就看是否挂载借支订单进行抵扣
+
+            }
+        }
         expenseAccountMapper.updateByPrimaryKeySelective(newEa);
         return 1;
     }
 
-    private void addExamineExpenseAccountLog(InputExpenseAccount in, ExpenseAccount useEa, ExpenseAccount newEa, Integer status) {
+    private void addExamineExpenseAccountLog(InputExpenseAccount in, ExpenseAccount useEa, ExpenseAccount newEa) {
         List<Admin> aids=new ArrayList<>();
         StringBuffer str=new StringBuffer();
+        Integer status=in.getStatus();
         AdminListBo admin = adminMapper.getDeptNameByAid(useEa.getAid());
         if (status==1){
             str=str.append("您有报销需要审核,").append("报销编号[").append(in.getId()).append("]").append(",请查看并审核。");
@@ -254,7 +266,7 @@ public class ExpenseAccountServiceImpl extends BaseMybatisDao<ExpenseAccountMapp
 
     @Override
     public Object updateType(InputExpenseAccount in) {
-        expenseAccountDetailsMapper.deleteByeaid(in.getUpdateType());
+        expenseAccountDetailsMapper.deleteByeaid(in.getId());
         return expenseAccountMapper.updateByPrimaryKeySelective(in);
     }