|
@@ -5,6 +5,7 @@ import cn.hutool.core.util.StrUtil;
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.dayou.common.BaseEntity;
|
|
|
+import com.dayou.configuration.DfsConfig;
|
|
|
import com.dayou.dto.*;
|
|
|
import com.dayou.entity.*;
|
|
|
import com.dayou.enums.CertificateEnum;
|
|
@@ -23,6 +24,7 @@ import com.dayou.service.workflow.IWorkFlowService;
|
|
|
import com.dayou.service.workflow.IWorkNodeService;
|
|
|
import com.dayou.service.workflow.IWorkNodeTaskService;
|
|
|
import com.dayou.utils.LoginContext;
|
|
|
+import com.dayou.utils.QRCodeUtil;
|
|
|
import com.dayou.vo.PersonalVO;
|
|
|
import com.dayou.vo.TaskTodoVO;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -40,6 +42,8 @@ import java.util.stream.Collectors;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
import static com.dayou.common.Constants.PERSONAL_INWARD;
|
|
|
+import static com.dayou.common.Constants.PROD_VALIDATE_URI;
|
|
|
+import static com.dayou.enums.MainBusinessEnum.PERSONAL_BUSINESS;
|
|
|
|
|
|
/**
|
|
|
* <p>
|
|
@@ -100,6 +104,10 @@ public class PersonalServiceImpl extends ServiceImpl<PersonalMapper, Personal> i
|
|
|
@Autowired
|
|
|
private IWorkNodeService workNodeService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private IBusinessProductionService businessProductionService;
|
|
|
+
|
|
|
+
|
|
|
@Override
|
|
|
@SuppressWarnings("unchecked")
|
|
|
public Page<PersonalVO> selectPage(Page page, PersonalVO personal){
|
|
@@ -126,9 +134,11 @@ public class PersonalServiceImpl extends ServiceImpl<PersonalMapper, Personal> i
|
|
|
PersonalTarget pt = new PersonalTarget();
|
|
|
pt.setPersonalId(personal.getId());
|
|
|
pt.setLocation(personal.getLocation());
|
|
|
+ //生成验证二维码
|
|
|
+ pt.setValidateCode(businessProductionService.doCreateValidateCode(PERSONAL_BUSINESS, personal.getId(), personal.getOrderId()));
|
|
|
personalTargetService.save(pt);
|
|
|
//个贷下单
|
|
|
- return workFlowService.openingOrder(MainBusinessEnum.PERSONAL_BUSINESS,personal.getId(),personal.getOrderId(),personal.getRemark());
|
|
|
+ return workFlowService.openingOrder(PERSONAL_BUSINESS,personal.getId(),personal.getOrderId(),personal.getRemark());
|
|
|
}
|
|
|
|
|
|
@Override
|
|
@@ -163,7 +173,7 @@ public class PersonalServiceImpl extends ServiceImpl<PersonalMapper, Personal> i
|
|
|
@Override
|
|
|
public Boolean doRecall(Long id) {
|
|
|
List<WorkFlowNodeInstance> exists = workFlowNodeInstanceService.list(new LambdaQueryWrapper<WorkFlowNodeInstance>()
|
|
|
- .eq(WorkFlowNodeInstance::getBusinessType, MainBusinessEnum.PERSONAL_BUSINESS.name())
|
|
|
+ .eq(WorkFlowNodeInstance::getBusinessType, PERSONAL_BUSINESS.name())
|
|
|
.eq(WorkFlowNodeInstance::getBusinessId, id)
|
|
|
.eq(BaseEntity::getDeleted, Boolean.FALSE));
|
|
|
if (exists.size()>2){
|
|
@@ -224,7 +234,7 @@ public class PersonalServiceImpl extends ServiceImpl<PersonalMapper, Personal> i
|
|
|
List<WorkFlowLog> workFlowLogs = todoVOList.stream().map(x -> {
|
|
|
WorkFlowLog log = new WorkFlowLog();
|
|
|
log.setBusinessId(x.getBusinessId());
|
|
|
- log.setBusinessType(MainBusinessEnum.PERSONAL_BUSINESS.name());
|
|
|
+ log.setBusinessType(PERSONAL_BUSINESS.name());
|
|
|
log.setHandingTime(new Date().getTime() - x.getTaskCreated().getTime());
|
|
|
log.setHandlerId(currentUserId);
|
|
|
log.setState(NodeLogEnum.PASS.name());
|
|
@@ -288,7 +298,7 @@ public class PersonalServiceImpl extends ServiceImpl<PersonalMapper, Personal> i
|
|
|
* @return
|
|
|
*/
|
|
|
private Long aimPriceStaff(){
|
|
|
- WorkNode workNode = workNodeService.getUniqueNodeByFlowNameAndNodeName(MainBusinessEnum.PERSONAL_BUSINESS, WorkflowNodeEnum.DETERMINE_PRICE);
|
|
|
+ WorkNode workNode = workNodeService.getUniqueNodeByFlowNameAndNodeName(PERSONAL_BUSINESS, WorkflowNodeEnum.DETERMINE_PRICE);
|
|
|
if (workNode!=null){
|
|
|
WorkNodeTask latestNodeTask = workNodeTaskService.getLatestNodeTask(workNode.getId());
|
|
|
if (latestNodeTask!=null){
|
|
@@ -322,12 +332,12 @@ public class PersonalServiceImpl extends ServiceImpl<PersonalMapper, Personal> i
|
|
|
claimOrders.stream().forEach(x->{
|
|
|
//检查该订单是否创建应收款记录
|
|
|
OrderFund orderFund = orderFundService.getOne(new LambdaQueryWrapper<OrderFund>().eq(OrderFund::getOrderId, x.getOrderId())
|
|
|
- .eq(OrderFund::getBusinessId,x.getId()).eq(OrderFund::getBusinessType,MainBusinessEnum.PERSONAL_BUSINESS.name())
|
|
|
+ .eq(OrderFund::getBusinessId,x.getId()).eq(OrderFund::getBusinessType, PERSONAL_BUSINESS.name())
|
|
|
.eq(BaseEntity::getDeleted, Boolean.FALSE));
|
|
|
if (orderFund==null){
|
|
|
orderFund = new OrderFund();
|
|
|
orderFund.setOrderId(x.getOrderId());
|
|
|
- orderFund.setBusinessType(MainBusinessEnum.PERSONAL_BUSINESS.name());
|
|
|
+ orderFund.setBusinessType(PERSONAL_BUSINESS.name());
|
|
|
orderFund.setBusinessId(x.getId());
|
|
|
orderFund.setOrderName(x.getOrderName());
|
|
|
orderFundService.save(orderFund);
|