|
|
@@ -116,20 +116,22 @@ public class ExpenseAccountServiceImpl extends BaseMybatisDao<ExpenseAccountMapp
|
|
|
for (int i=1;i<4;i++){
|
|
|
ExpenseAccountExamine eae=new ExpenseAccountExamine(id,i);
|
|
|
if (i==1){
|
|
|
- //新增一级
|
|
|
- String examineId=null;
|
|
|
- String examineName=null;
|
|
|
- //正常用上级,没有的情况下就是自己
|
|
|
- if (a.getSuperId()!=null){
|
|
|
- examineId=a.getSuperId();
|
|
|
- examineName=a.getSuperName();
|
|
|
- }else {
|
|
|
- examineId=a.getId();
|
|
|
- examineName=a.getName();
|
|
|
+ if (a.getExpenseSuperExamine()==1){
|
|
|
+ //新增一级
|
|
|
+ String examineId=null;
|
|
|
+ String examineName=null;
|
|
|
+ //正常用上级,没有的情况下就是自己
|
|
|
+ if (a.getSuperId()!=null){
|
|
|
+ examineId=a.getSuperId();
|
|
|
+ examineName=a.getSuperName();
|
|
|
+ }else {
|
|
|
+ examineId=a.getId();
|
|
|
+ examineName=a.getName();
|
|
|
+ }
|
|
|
+ eae.setAuditor(examineId);
|
|
|
+ eae.setAuditorname(examineName);
|
|
|
+ ea.setExamineName(examineName);
|
|
|
}
|
|
|
- eae.setAuditor(examineId);
|
|
|
- eae.setAuditorname(examineName);
|
|
|
- ea.setExamineName(examineName);
|
|
|
}else if (i==2){
|
|
|
if (StringUtils.isBlank(dep.getManagerName())){
|
|
|
throw new BusinessException("报销申请部门[管理员]不存在。");
|
|
|
@@ -200,7 +202,8 @@ public class ExpenseAccountServiceImpl extends BaseMybatisDao<ExpenseAccountMapp
|
|
|
in.setProcessStatus(in.getProcessStatus()+1);
|
|
|
}else {
|
|
|
if (admin.getSuperiorId()==null||admin.getId().equals(admin.getSuperiorId())){
|
|
|
- String str2=String.format("重复审核人跳过[%s]。",EAProcessStatus.getDesc(in.getProcessStatus()));
|
|
|
+
|
|
|
+ String str2=String.format("%s跳过[%s]。",admin.getSuperiorId()==null?"发起人无上级":"发起人与上级同人",EAProcessStatus.getDesc(in.getProcessStatus()));
|
|
|
Date date=new Date();
|
|
|
date.setTime(date.getTime()+1000L);
|
|
|
addExpenseAccountLog(in.getId(),1,in.getProcessStatus(),aid,str2,date,2);
|
|
|
@@ -376,11 +379,12 @@ public class ExpenseAccountServiceImpl extends BaseMybatisDao<ExpenseAccountMapp
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public Object updateTypeOther(Integer id, String typeOther,String remarks) {
|
|
|
+ public Object updateTypeOther(Integer id, String typeOther,String remarks,String orderNo) {
|
|
|
ExpenseAccount ea = new ExpenseAccount();
|
|
|
ea.setId(id);
|
|
|
if (StringUtils.isNotEmpty(typeOther))ea.setTypeOther(typeOther);
|
|
|
if (StringUtils.isNotEmpty(remarks))ea.setRemarks(remarks);
|
|
|
+ if (StringUtils.isNotEmpty(orderNo))ea.setOrderNo(orderNo);
|
|
|
expenseAccountMapper.updateByPrimaryKeySelective(ea);
|
|
|
if (StringUtils.isNotEmpty(typeOther)){
|
|
|
MainExpenseAccount mainExpenseAccount = expenseAccountMapper.selectbySonId(id);
|
|
|
@@ -726,6 +730,7 @@ public class ExpenseAccountServiceImpl extends BaseMybatisDao<ExpenseAccountMapp
|
|
|
}else {
|
|
|
addExpenseAccountLog(in.getId(),status,useEa.getProcessStatus(),TokenManager.getAdminId(),in.getReason());
|
|
|
newEa.setStatus(1);
|
|
|
+ //小于为固定单审核,大于可能被配置多人审核
|
|
|
if (useEa.getProcessStatus()<EAProcessStatus.CWFS.getCode()){
|
|
|
newEa.setProcessStatus(useEa.getProcessStatus()+1);
|
|
|
}else {
|
|
|
@@ -1270,10 +1275,14 @@ public class ExpenseAccountServiceImpl extends BaseMybatisDao<ExpenseAccountMapp
|
|
|
Map<String,Object> params = new HashMap<>();
|
|
|
if(in.getStatus()!=null)params.put("status",in.getStatus());
|
|
|
if(in.getType()!=null)params.put("type",in.getType());
|
|
|
- if (in.getDepId()!=null)params.put("depId",in.getDepId());
|
|
|
+ if (in.getDepId()!=null){
|
|
|
+ ArrayList<Object> deps = new ArrayList<>();
|
|
|
+ deps.add(in.getDepId());
|
|
|
+ params.put("deps",deps);
|
|
|
+ }
|
|
|
if (in.getContractNo()!=null)params.put("contractNo",in.getContractNo());
|
|
|
if (in.getBuyerName()!=null)params.put("buyerName",in.getBuyerName());
|
|
|
- if (in.getAname()!=null)params.put("aname",in.getAname());
|
|
|
+ if (in.getAid()!=null)params.put("aid",in.getAid());
|
|
|
if (in.getApplyDep()!=null)params.put("applyDep",in.getApplyDep());
|
|
|
if (in.getPayDep() != null)params.put("payDep",in.getPayDep());
|
|
|
if (in.getStartTime()!=null)params.put("startTime",in.getStartTime());
|
|
|
@@ -1284,10 +1293,10 @@ public class ExpenseAccountServiceImpl extends BaseMybatisDao<ExpenseAccountMapp
|
|
|
params.put("roleType",3);
|
|
|
}else if (TokenManager.hasRole(AFTConstants.FINANCE_MANAGER)){
|
|
|
params.put("roleType",2);
|
|
|
- params.put("aid",TokenManager.getAdminId());
|
|
|
+ params.put("current",TokenManager.getAdminId());
|
|
|
}else if (TokenManager.hasRole(AFTConstants.FINANCE)){
|
|
|
params.put("roleType",1);
|
|
|
- params.put("aid",TokenManager.getAdminId());
|
|
|
+ params.put("current",TokenManager.getAdminId());
|
|
|
}else{
|
|
|
params.put("roleType",0);
|
|
|
}
|