|
|
|
|
@ -43,7 +43,6 @@ import org.springblade.desk.common.pojo.entity.MesApprovalFlowUserEntity; |
|
|
|
|
import org.springblade.desk.common.pojo.entity.MesApprovalRecordEntity; |
|
|
|
|
import org.springblade.desk.common.pojo.vo.*; |
|
|
|
|
import org.springblade.desk.common.service.*; |
|
|
|
|
import org.springblade.desk.oem.pojo.entity.OemSettlementApprovalEntity; |
|
|
|
|
import org.springblade.system.cache.UserCache; |
|
|
|
|
import org.springframework.beans.BeanUtils; |
|
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
|
@ -183,11 +182,12 @@ public class MesApprovalRecordServiceImpl extends BaseServiceImpl<MesApprovalRec |
|
|
|
|
|
|
|
|
|
List<MesApprovalFlowDefinitionEntity> flowDefinitionList = approvalFlowDefinitionService.list(new LambdaQueryWrapper<MesApprovalFlowDefinitionEntity>().eq(MesApprovalFlowDefinitionEntity::getBizType, bizType).orderByAsc(MesApprovalFlowDefinitionEntity::getSort)); |
|
|
|
|
List<MesApprovalFlowEntity> flowList = new ArrayList<>(); |
|
|
|
|
for (MesApprovalFlowDefinitionEntity definition : flowDefinitionList) { |
|
|
|
|
for (int i = 0; i < flowDefinitionList.size(); i++) { |
|
|
|
|
MesApprovalFlowDefinitionEntity definition = flowDefinitionList.get(i); |
|
|
|
|
int status; |
|
|
|
|
if (definition.getSort() == 1) { |
|
|
|
|
if (i == 0) { |
|
|
|
|
status = 3; |
|
|
|
|
} else if (definition.getSort() == 2) { |
|
|
|
|
} else if (i == 1) { |
|
|
|
|
status = 2; |
|
|
|
|
} else { |
|
|
|
|
status = 1; |
|
|
|
|
@ -197,7 +197,7 @@ public class MesApprovalRecordServiceImpl extends BaseServiceImpl<MesApprovalRec |
|
|
|
|
} |
|
|
|
|
approvalFlowService.saveBatch(flowList); |
|
|
|
|
MesApprovalFlowEntity firstFlow = flowList.stream().filter(flow -> flow.getSort() == 1).findFirst().orElse(null); |
|
|
|
|
if(firstFlow != null){ |
|
|
|
|
if (firstFlow != null) { |
|
|
|
|
MesApprovalFlowUserEntity flowUser = new MesApprovalFlowUserEntity(); |
|
|
|
|
flowUser.setFlowId(firstFlow.getId()); |
|
|
|
|
flowUser.setApprovalUser(approvalRecord.getCreateUser()); |
|
|
|
|
|