|
|
@@ -211,7 +211,8 @@ public class ExpenseAccountServiceImpl extends BaseMybatisDao<ExpenseAccountMapp
|
|
|
AdminListBo admin = adminMapper.getDeptNameByAid(in.getAid());
|
|
|
OrganizationListOut dep = departmentMapper.selectAllById(in.getApplyDep());
|
|
|
List<ExpenseConfigDetails> configDetailsList = expenseConfigDetailsMapper.selectByDepId(in.getApplyDep());
|
|
|
- List<ExpenseAccountExamine> list=examineByprocess(in,admin,dep,configDetailsList);
|
|
|
+ examineByprocess(in,admin,dep,configDetailsList);
|
|
|
+ List<ExpenseAccountExamine> list=expenseAccountExamineMapper.selectByEaidAndProcessStatus(in.getId(), in.getProcessStatus());
|
|
|
List<Admin> aids=new ArrayList<>();
|
|
|
StringBuffer aname =new StringBuffer();
|
|
|
for (ExpenseAccountExamine e : list) {
|
|
|
@@ -465,8 +466,7 @@ public class ExpenseAccountServiceImpl extends BaseMybatisDao<ExpenseAccountMapp
|
|
|
private void addDetailsLog(List<OutExpenseAccountLog> list, ExpenseAccount expenseAccount,Integer useStatus) {
|
|
|
OrganizationListOut dep = departmentMapper.selectAllById(expenseAccount.getApplyDep());
|
|
|
List<ExpenseConfigDetails> configDetails = expenseConfigDetailsMapper.selectByDepId(expenseAccount.getApplyDep());
|
|
|
- for (int processStatus = 3; processStatus < 8; processStatus++) {
|
|
|
- processStatus=useStatus;
|
|
|
+ for (int processStatus = useStatus; processStatus < 8; processStatus++) {
|
|
|
if (processStatus ==3){
|
|
|
if (dep.getExpenseRetrialFinanceExamine()==1){
|
|
|
List<ExpenseConfigDetails> collect = configDetails.stream().filter(e -> e.getType() == 1).collect(Collectors.toList());
|
|
|
@@ -662,7 +662,8 @@ public class ExpenseAccountServiceImpl extends BaseMybatisDao<ExpenseAccountMapp
|
|
|
}
|
|
|
if (newEa.getApproval()==null)newEa.setApproval(useEa.getApproval());
|
|
|
//流程的推动
|
|
|
- List<ExpenseAccountExamine> list=examineByprocess(newEa,admin,dep,configDetailsList);
|
|
|
+ examineByprocess(newEa,admin,dep,configDetailsList);
|
|
|
+ List<ExpenseAccountExamine> list=expenseAccountExamineMapper.selectByEaidAndProcessStatus(newEa.getId(), newEa.getProcessStatus());
|
|
|
StringBuffer aname =new StringBuffer();
|
|
|
for (ExpenseAccountExamine e : list) {
|
|
|
if (e.getProcessStatus()==newEa.getProcessStatus()&&e.getStatus()==0){
|
|
|
@@ -722,7 +723,7 @@ public class ExpenseAccountServiceImpl extends BaseMybatisDao<ExpenseAccountMapp
|
|
|
* 审核流程推送,只要不是完成状态就继续判断是否跳过
|
|
|
* @param newEa
|
|
|
*/
|
|
|
- private List<ExpenseAccountExamine> examineByprocess( ExpenseAccount newEa,AdminListBo admin,OrganizationListOut dep,List<ExpenseConfigDetails> list) {
|
|
|
+ private void examineByprocess( ExpenseAccount newEa,AdminListBo admin,OrganizationListOut dep,List<ExpenseConfigDetails> list) {
|
|
|
List<ExpenseAccountExamine> examineList=new ArrayList<>();
|
|
|
//小于财务复审的,走单审核
|
|
|
if (newEa.getProcessStatus()<EAProcessStatus.CWFS.getCode()){
|
|
|
@@ -768,7 +769,7 @@ public class ExpenseAccountServiceImpl extends BaseMybatisDao<ExpenseAccountMapp
|
|
|
flag2=true;
|
|
|
tip=EAProcessStatus.CWFS.getDesc();
|
|
|
}else {
|
|
|
- boolean expenseExamine = pushExpenseExamine(list, newEa, examineList, EAProcessStatus.CWFS.getCode());
|
|
|
+ boolean expenseExamine = pushExpenseExamine(list, newEa, examineList, EAProcessStatus.CNSH.getCode());
|
|
|
if (expenseExamine){
|
|
|
flag3=true;
|
|
|
}
|
|
|
@@ -814,10 +815,8 @@ public class ExpenseAccountServiceImpl extends BaseMybatisDao<ExpenseAccountMapp
|
|
|
flag2=true;
|
|
|
tip=EAProcessStatus.CNSH.getDesc();
|
|
|
}else {
|
|
|
- boolean expenseExamine = pushExpenseExamine(list, newEa, examineList, EAProcessStatus.CNSH.getCode());
|
|
|
- if (expenseExamine){
|
|
|
- flag3=true;
|
|
|
- }
|
|
|
+ //财务出纳在审核时不与前置审核做同步
|
|
|
+ pushExpenseExamine(list, newEa, examineList, EAProcessStatus.CNSH.getCode());
|
|
|
}
|
|
|
}
|
|
|
if (flag2){
|
|
|
@@ -836,8 +835,6 @@ public class ExpenseAccountServiceImpl extends BaseMybatisDao<ExpenseAccountMapp
|
|
|
examineByprocess(newEa,admin,dep,list);
|
|
|
}
|
|
|
}
|
|
|
- examineList=expenseAccountExamineMapper.selectByEaidAndProcessStatus(newEa.getId(), newEa.getProcessStatus());
|
|
|
- return examineList;
|
|
|
}
|
|
|
|
|
|
private boolean pushExpenseExamine(List<ExpenseConfigDetails> list, ExpenseAccount newEa, List<ExpenseAccountExamine> examineList, Integer status) {
|
|
|
@@ -858,9 +855,14 @@ public class ExpenseAccountServiceImpl extends BaseMybatisDao<ExpenseAccountMapp
|
|
|
eae.setAuditorname(e.getAdminName());
|
|
|
eae.setStatus(0);
|
|
|
Integer i = expenseAccountExamineMapper.selectYesByParam(newEa.getId(), e.getAid());
|
|
|
- if (i>0||e.getAid().equals(TokenManager.getAdminId())) {
|
|
|
- eae.setStatus(1);
|
|
|
+ if (status==EAProcessStatus.CNSH.getCode()){
|
|
|
+ eae.setStatus(0);
|
|
|
count++;
|
|
|
+ }else {
|
|
|
+ if (i>0||e.getAid().equals(TokenManager.getAdminId())) {
|
|
|
+ eae.setStatus(1);
|
|
|
+ count++;
|
|
|
+ }
|
|
|
}
|
|
|
expenseAccountExamineMapper.insertSelective(eae);
|
|
|
}
|