|
|
@@ -4,22 +4,24 @@ import com.goafanti.common.constant.AFTConstants;
|
|
|
import com.goafanti.common.dao.*;
|
|
|
import com.goafanti.common.error.BusinessException;
|
|
|
import com.goafanti.common.model.Admin;
|
|
|
+import com.goafanti.common.model.ExpenseAccount;
|
|
|
import com.goafanti.common.model.ExpenseAccountLog;
|
|
|
import com.goafanti.common.model.PublicRelease;
|
|
|
import com.goafanti.common.utils.DateUtils;
|
|
|
+import com.goafanti.core.mybatis.BaseMybatisDao;
|
|
|
+import com.goafanti.core.mybatis.page.Pagination;
|
|
|
import com.goafanti.core.shiro.token.TokenManager;
|
|
|
-import com.goafanti.expenseAccount.bo.InputExpenseAccount;
|
|
|
-import com.goafanti.expenseAccount.bo.InputExpenseAccountDetails;
|
|
|
-import com.goafanti.expenseAccount.bo.OutExpenseAccount;
|
|
|
-import com.goafanti.expenseAccount.bo.OutExpenseAccountDetails;
|
|
|
+import com.goafanti.expenseAccount.bo.*;
|
|
|
import com.goafanti.expenseAccount.service.ExpenseAccountService;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
+import java.util.HashMap;
|
|
|
import java.util.List;
|
|
|
+import java.util.Map;
|
|
|
|
|
|
@Service
|
|
|
-public class ExpenseAccountServiceImpl implements ExpenseAccountService {
|
|
|
+public class ExpenseAccountServiceImpl extends BaseMybatisDao<ExpenseAccountMapper> implements ExpenseAccountService {
|
|
|
@Autowired
|
|
|
private AdminMapper adminMapper;
|
|
|
@Autowired
|
|
|
@@ -85,7 +87,7 @@ public class ExpenseAccountServiceImpl implements ExpenseAccountService {
|
|
|
if (useEA.getStatus()==0){
|
|
|
addExpenseAccountLog(useEA.getId(),1,"发起报销审核");
|
|
|
}else if (useEA.getStatus()==3){
|
|
|
- addExpenseAccountLog(useEA.getId(),1,"修改重新发起审核");
|
|
|
+ addExpenseAccountLog(useEA.getId(),4,"修改重新发起审核");
|
|
|
}
|
|
|
return expenseAccountMapper.updateByPrimaryKeySelective(in);
|
|
|
}
|
|
|
@@ -111,4 +113,47 @@ public class ExpenseAccountServiceImpl implements ExpenseAccountService {
|
|
|
public Object logList(Integer eaid) {
|
|
|
return expenseAccountLogMapper.selectByEaid(eaid);
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public ExpenseAccountExamineLog examineLog(Integer eaid) {
|
|
|
+ return expenseAccountLogMapper.selectExamineLog(eaid);
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public int updateExamine(InputExpenseAccount in) {
|
|
|
+ ExpenseAccount useEa = expenseAccountMapper.selectByPrimaryKey(in.getId());
|
|
|
+ if (useEa.getStatus()!=1)throw new BusinessException("审核状态错误");
|
|
|
+ if (useEa.getProcessStatus()!=in.getProcessStatus())throw new BusinessException("审核流程错误");
|
|
|
+ //审核通知
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public Object pageList(InputPageListBo in) {
|
|
|
+ Map<String ,Object> param=new HashMap<>();
|
|
|
+ addParam(in, param);
|
|
|
+ return findPage("selectExpenseAccountList", "selectExpenseAccountCount", param, in.getPageNo(), in.getPageSize());
|
|
|
+ }
|
|
|
+
|
|
|
+ private void addParam(InputPageListBo in, Map<String, Object> param) {
|
|
|
+ param.put("aid",TokenManager.getAdminId());
|
|
|
+ if (in.getTimeSort()!=null){
|
|
|
+ param.put("timeSort", in.getTimeSort());
|
|
|
+ }else {
|
|
|
+ param.put("timeSort",0);
|
|
|
+ }
|
|
|
+
|
|
|
+ if (in.getExamineSort()!=null){
|
|
|
+ param.put("examineSort", in.getExamineSort());
|
|
|
+ }else {
|
|
|
+ param.put("examineSort",0);
|
|
|
+ }
|
|
|
+ if (in.getProcessStatus()!=null){
|
|
|
+ param.put("processStatus", in.getProcessStatus());
|
|
|
+ }else {
|
|
|
+ param.put("processStatus",0);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
}
|