|
@@ -143,6 +143,7 @@ public class ExpenseInfoServiceImpl extends ServiceImpl<ExpenseInfoMapper, Expen
|
|
{
|
|
{
|
|
expenseInfo.setStatusFlag(StatusEnum.COST_PAYMENT.getFlag());
|
|
expenseInfo.setStatusFlag(StatusEnum.COST_PAYMENT.getFlag());
|
|
expenseInfo.setStatus(StatusEnum.COST_PAYMENT.getName());
|
|
expenseInfo.setStatus(StatusEnum.COST_PAYMENT.getName());
|
|
|
|
+ expenseInfo.setUnallocatedAmount(expenseInfo.getAmountMoney()-expenseInfo.getTotalDistribution());
|
|
this.insert(expenseInfo);
|
|
this.insert(expenseInfo);
|
|
//分配列表
|
|
//分配列表
|
|
List<ExpenseAllocationInfo> expenseAllocationInfoList = expenseInfo.getExpenseAllocationInfoList();
|
|
List<ExpenseAllocationInfo> expenseAllocationInfoList = expenseInfo.getExpenseAllocationInfoList();
|
|
@@ -164,7 +165,7 @@ public class ExpenseInfoServiceImpl extends ServiceImpl<ExpenseInfoMapper, Expen
|
|
// 不是退回的单子
|
|
// 不是退回的单子
|
|
if (isStartWorkflow) {
|
|
if (isStartWorkflow) {
|
|
Workflow workflow = workflowService
|
|
Workflow workflow = workflowService
|
|
- .findLatestWorkflowByBusinessCodeByApp(expenseInfo.getCompId(), "EX-CONTRACT-APPROVE");
|
|
|
|
|
|
+ .findLatestWorkflowByBusinessCodeByApp(expenseInfo.getCompId(), "FEE_DETAILS_MANG");
|
|
// 没配置审核流程,直接结束并处理信息
|
|
// 没配置审核流程,直接结束并处理信息
|
|
if (workflow == null) {
|
|
if (workflow == null) {
|
|
throw new YException(YExceptionEnum.PURCHASE_ORDER_ERROR);
|
|
throw new YException(YExceptionEnum.PURCHASE_ORDER_ERROR);
|
|
@@ -214,7 +215,7 @@ public class ExpenseInfoServiceImpl extends ServiceImpl<ExpenseInfoMapper, Expen
|
|
}
|
|
}
|
|
}
|
|
}
|
|
//编辑分配
|
|
//编辑分配
|
|
- else {
|
|
|
|
|
|
+ else if ("3".equals(expenseInfo.getFlag())){
|
|
List<ExpenseAllocationInfo> expenseAllocationInfoList = expenseInfo.getExpenseAllocationInfoList();
|
|
List<ExpenseAllocationInfo> expenseAllocationInfoList = expenseInfo.getExpenseAllocationInfoList();
|
|
if (!CollectionUtils.isEmpty(expenseAllocationInfoList)) {
|
|
if (!CollectionUtils.isEmpty(expenseAllocationInfoList)) {
|
|
for (ExpenseAllocationInfo expenseAllocationInfo : expenseAllocationInfoList) {
|
|
for (ExpenseAllocationInfo expenseAllocationInfo : expenseAllocationInfoList) {
|
|
@@ -222,7 +223,27 @@ public class ExpenseInfoServiceImpl extends ServiceImpl<ExpenseInfoMapper, Expen
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+ //主表编辑 flag==4
|
|
|
|
+ //驳回分配
|
|
|
|
+ else if ("5".equals(expenseInfo.getFlag())){
|
|
|
|
+ expenseInfo.setDistributionStatusFlag(StatusEnum.REJECTED.getFlag());
|
|
|
|
+ expenseInfo.setDistributionStatus(StatusEnum.REJECTED.getName());
|
|
|
|
+ List<ExpenseAllocationInfo> expenseAllocationInfos=expenseAllocationInfoService.selectList(new EntityWrapper<ExpenseAllocationInfo>()
|
|
|
|
+ .eq("info_id",expenseInfo.getId())
|
|
|
|
+ .eq("status","待确认"));
|
|
|
|
+ if (!CollectionUtils.isEmpty(expenseAllocationInfos)){
|
|
|
|
+ for (ExpenseAllocationInfo expenseAllocationInfo:expenseAllocationInfos){
|
|
|
|
+ expenseAllocationInfo.setStatusFlag(StatusEnum.REJECTED.getFlag());
|
|
|
|
+ expenseAllocationInfo.setStatus(StatusEnum.REJECTED.getName());
|
|
|
|
+ expenseAllocationInfoService.updateById(expenseAllocationInfo);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ //驳回收款
|
|
|
|
+ else if ("6".equals(expenseInfo.getFlag())) {
|
|
|
|
+ expenseInfo.setStatusFlag(StatusEnum.REJECTED.getFlag());
|
|
|
|
+ expenseInfo.setStatus(StatusEnum.REJECTED.getName());
|
|
|
|
+ }
|
|
// 主表信息编辑
|
|
// 主表信息编辑
|
|
boolean one = this.updateById(expenseInfo);
|
|
boolean one = this.updateById(expenseInfo);
|
|
// 假如成功返回ok
|
|
// 假如成功返回ok
|