Showing
1 changed file
with
20 additions
and
0 deletions
| @@ -5,6 +5,7 @@ import com.lframework.starter.bpm.enums.FlowInstanceStatus; | @@ -5,6 +5,7 @@ import com.lframework.starter.bpm.enums.FlowInstanceStatus; | ||
| 5 | import com.lframework.starter.bpm.service.BusinessDataHandlerService; | 5 | import com.lframework.starter.bpm.service.BusinessDataHandlerService; |
| 6 | import com.lframework.starter.web.core.utils.JsonUtil; | 6 | import com.lframework.starter.web.core.utils.JsonUtil; |
| 7 | import com.lframework.xingyun.sc.enums.CustomerDevelopStatus; | 7 | import com.lframework.xingyun.sc.enums.CustomerDevelopStatus; |
| 8 | +import com.lframework.xingyun.sc.service.customer.CustomerCreditService; | ||
| 8 | import com.lframework.xingyun.sc.service.customer.CustomerDevelopPlanService; | 9 | import com.lframework.xingyun.sc.service.customer.CustomerDevelopPlanService; |
| 9 | import lombok.extern.slf4j.Slf4j; | 10 | import lombok.extern.slf4j.Slf4j; |
| 10 | import org.apache.commons.collections4.MapUtils; | 11 | import org.apache.commons.collections4.MapUtils; |
| @@ -23,6 +24,8 @@ public class BusinessDataHandlerServiceImpl implements BusinessDataHandlerServic | @@ -23,6 +24,8 @@ public class BusinessDataHandlerServiceImpl implements BusinessDataHandlerServic | ||
| 23 | 24 | ||
| 24 | @Resource | 25 | @Resource |
| 25 | private CustomerDevelopPlanService customerDevelopPlanService; | 26 | private CustomerDevelopPlanService customerDevelopPlanService; |
| 27 | + @Resource | ||
| 28 | + private CustomerCreditService customerCreditService; | ||
| 26 | 29 | ||
| 27 | 30 | ||
| 28 | /** | 31 | /** |
| @@ -56,6 +59,9 @@ public class BusinessDataHandlerServiceImpl implements BusinessDataHandlerServic | @@ -56,6 +59,9 @@ public class BusinessDataHandlerServiceImpl implements BusinessDataHandlerServic | ||
| 56 | case "CUSTOMER_DEVELOP": | 59 | case "CUSTOMER_DEVELOP": |
| 57 | handleCustomerDevelopData(flowStatus, businessId); | 60 | handleCustomerDevelopData(flowStatus, businessId); |
| 58 | break; | 61 | break; |
| 62 | + case "CUSTOMER_CREDIT": | ||
| 63 | + handleCustomerCreditData(flowStatus, businessId); | ||
| 64 | + break; | ||
| 59 | default: | 65 | default: |
| 60 | break; | 66 | break; |
| 61 | } | 67 | } |
| @@ -77,4 +83,18 @@ public class BusinessDataHandlerServiceImpl implements BusinessDataHandlerServic | @@ -77,4 +83,18 @@ public class BusinessDataHandlerServiceImpl implements BusinessDataHandlerServic | ||
| 77 | customerDevelopPlanService.updateStatus(businessId, CustomerDevelopStatus.REFUSE); | 83 | customerDevelopPlanService.updateStatus(businessId, CustomerDevelopStatus.REFUSE); |
| 78 | } | 84 | } |
| 79 | } | 85 | } |
| 86 | + | ||
| 87 | + /** | ||
| 88 | + * 客户资信业务数据处理 | ||
| 89 | + * | ||
| 90 | + * @param businessId 业务ID | ||
| 91 | + */ | ||
| 92 | + private void handleCustomerCreditData(String flowStatus, String businessId) { | ||
| 93 | + if (FlowInstanceStatus.APPROVE_PASS.getCode().equals(flowStatus)) { | ||
| 94 | + customerCreditService.updateStatus(businessId, "PASS"); | ||
| 95 | + } else if (FlowInstanceStatus.REVOKE.getCode().equals(flowStatus)) { | ||
| 96 | + customerCreditService.updateStatus(businessId, "REFUSE"); | ||
| 97 | + } | ||
| 98 | + } | ||
| 99 | + | ||
| 80 | } | 100 | } |