|
|
@@ -134,7 +134,8 @@ public class ExpenseAccountServiceImpl extends BaseMybatisDao<ExpenseAccountMapp
|
|
|
eae.setAuditor(dep.getExpenseFinanceId());
|
|
|
eae.setAuditorname(dep.getExpenseFinanceName());
|
|
|
}else if (i==4){
|
|
|
-
|
|
|
+ eae.setAuditor(dep.getExpenseRetrialFinanceId());
|
|
|
+ eae.setAuditorname(dep.getExpenseRetrialFinanceName());
|
|
|
}
|
|
|
if (eae.getAuditor().equals(aid))eae.setStatus(1);
|
|
|
else eae.setStatus(0);
|
|
|
@@ -479,31 +480,37 @@ public class ExpenseAccountServiceImpl extends BaseMybatisDao<ExpenseAccountMapp
|
|
|
newEa.setAid(useEa.getAid());
|
|
|
newEa.setCreateTime(useEa.getCreateTime());
|
|
|
List<ExpenseAccountExamine> list=examineByprocess(newEa,admin);
|
|
|
- StringBuffer aname =new StringBuffer();
|
|
|
- for (ExpenseAccountExamine e : list) {
|
|
|
- if (e.getProcessStatus()==newEa.getProcessStatus()&&e.getStatus()==0){
|
|
|
- Admin ad=adminMapper.selectByPrimaryKey(e.getAuditor());
|
|
|
- aids.add(ad);
|
|
|
- aname=aname.append(ad.getName()).append(",");
|
|
|
+ if(newEa.getProcessStatus()==4){
|
|
|
+ //完成后的流程
|
|
|
+ status =2;
|
|
|
+// Admin finaceAdmin = adminMapper.selectByPrimaryKey(admin.getDepFinance());
|
|
|
+// //同事添加通知财务管理员与公司副总
|
|
|
+// List<Admin> admins = adminMapper.selectAdminByRoleType(AFTConstants.FINANCE_ADMIN);
|
|
|
+// aids.addAll(admins);
|
|
|
+// List<Admin> viceCEO = adminMapper.selectAdminByRoleType(AFTConstants.VICE_CEO);
|
|
|
+// aids.addAll(viceCEO);
|
|
|
+// aids.add(finaceAdmin);
|
|
|
+// str.setLength(0);
|
|
|
+// str=str.append("报销编号[").append(in.getCheckNo()).append("]审核已通过,请注意查看。");
|
|
|
+// addNoticeAndEmail(in, status,str.toString(),admin.getName(),aids);
|
|
|
+// aids.clear();
|
|
|
+ aids.add(adminMapper.selectByPrimaryKey(admin.getId()));
|
|
|
+ newEa.setStatus(status);
|
|
|
+ newEa.setExamineName("");
|
|
|
+ }else {
|
|
|
+ StringBuffer aname =new StringBuffer();
|
|
|
+ for (ExpenseAccountExamine e : list) {
|
|
|
+ if (e.getProcessStatus()==newEa.getProcessStatus()&&e.getStatus()==0){
|
|
|
+ Admin ad=adminMapper.selectByPrimaryKey(e.getAuditor());
|
|
|
+ aids.add(ad);
|
|
|
+ aname=aname.append(ad.getName()).append(",");
|
|
|
+
|
|
|
+ }
|
|
|
}
|
|
|
+ newEa.setExamineName(aname.substring(0,aname.length()-1));
|
|
|
}
|
|
|
- newEa.setExamineName(aname.substring(0,aname.length()-1));
|
|
|
- //完成后的流程
|
|
|
-// status =2;
|
|
|
-// Admin finaceAdmin = adminMapper.selectByPrimaryKey(admin.getDepFinance());
|
|
|
-// //同事添加通知财务管理员与公司副总
|
|
|
-// List<Admin> admins = adminMapper.selectAdminByRoleType(AFTConstants.FINANCE_ADMIN);
|
|
|
-// aids.addAll(admins);
|
|
|
-// List<Admin> viceCEO = adminMapper.selectAdminByRoleType(AFTConstants.VICE_CEO);
|
|
|
-// aids.addAll(viceCEO);
|
|
|
-// aids.add(finaceAdmin);
|
|
|
-// str.setLength(0);
|
|
|
-// str=str.append("报销编号[").append(in.getCheckNo()).append("]审核已通过,请注意查看。");
|
|
|
-// addNoticeAndEmail(in, status,str.toString(),admin.getName(),aids);
|
|
|
-// aids.clear();
|
|
|
-// aids.add(adminMapper.selectByPrimaryKey(admin.getId()));
|
|
|
-// newEa.setStatus(status);
|
|
|
-// newEa.setExamineName("");
|
|
|
+
|
|
|
+
|
|
|
}else {
|
|
|
aids.add(adminMapper.selectByPrimaryKey(admin.getId()));
|
|
|
newEa.setStatus(3);
|
|
|
@@ -665,11 +672,12 @@ public class ExpenseAccountServiceImpl extends BaseMybatisDao<ExpenseAccountMapp
|
|
|
|
|
|
@Override
|
|
|
public Object selectByCheckNo(String checkNo) {
|
|
|
+ checkNo=checkNo.trim();
|
|
|
OutExpenseAccount useEa = expenseAccountMapper.selectByCheckNo(checkNo);
|
|
|
if (useEa==null){
|
|
|
throw new BusinessException("报销编号不存在,请客对后再查询。");
|
|
|
}
|
|
|
- if (useEa.getProcessStatus()<3){
|
|
|
+ if (useEa.getProcessStatus()<3||useEa.getStatus()!=2){
|
|
|
throw new BusinessException("报销单财务未审核,不可以根据编号查看打印。");
|
|
|
}
|
|
|
return useEa;
|