Commit 6d967ac0 by 刘鑫

test(BEAN 接口联调): 增加接口测试逻辑

1 parent 06f5e587
......@@ -10,6 +10,7 @@ import lombok.extern.slf4j.Slf4j;
import org.apache.commons.codec.digest.DigestUtils;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import java.util.List;
import java.util.Objects;
......@@ -61,6 +62,52 @@ public class BeanRemoteServiceImpl {
BeanR<BranchDetail> branchDetailBeanR = beanRemoteService.branchDetail(accessToken, "1341423191870971906");
log.info("[查询BEAN部门分部详情]【/api/openapi/department/getBranchDetail】返回值-------------------->{}", JsonUtil.toJson(branchDetailBeanR));
//1.9 查询网点/车队列表
BeanR<List<ServiceOrg>> listBeanR3 = beanRemoteService.serviceOrgList(accessToken, 1);
log.info("[查询网点/车队列表]【/api/openapi/department/queryServiceOrgList】返回值-------------------->{}", JsonUtil.toJson(listBeanR3));
//2.0 查询网点/车队详情
List<ServiceOrg> data = listBeanR3.getData();
if (!CollectionUtils.isEmpty(data)) {
String serviceOrgId = data.get(0).getServiceOrgId();
BeanR<ServiceOrgDetail> beanR = beanRemoteService.serviceOrgDetail(accessToken, serviceOrgId);
log.info("[查询网点/车队列表]【/api/openapi/department/queryServiceOrgList】返回值-------------------->{}", JsonUtil.toJson(beanR));
}
Rescheduled rescheduled = new Rescheduled();
rescheduled.setRisId("1000000302");
rescheduled.setRescheduledDate(System.currentTimeMillis());
rescheduled.setReasonForRescheduling("reason");
rescheduled.setRemarksForRescheduling("remark");
rescheduled.setReassignment(Boolean.TRUE);
rescheduled.setRequireApprove(Boolean.FALSE);
rescheduled.setInitiatorOfRescheduling("11111");
BeanR<?> beanRq = beanRemoteService.orderRescheduled(accessToken, rescheduled);
log.info("[服务工单改约]【/api/openapi/task/rescheduled 】返回值-------------------->{}", JsonUtil.toJson(beanRq));
OrderCancel orderCancel = new OrderCancel();
orderCancel.setRisId("S20230615000001");
orderCancel.setCancellationReason("example_reason");
orderCancel.setCancelNote("example_note");
orderCancel.setCancelStartTime(1678594800000L);
orderCancel.setCancelInitiator("example_initiator");
BeanR<?> beanR1 = beanRemoteService.orderTaskCancel(accessToken, orderCancel);
log.info("[服务工单取消]【/api/openapi/task/cancel】返回值-------------------->{}", JsonUtil.toJson(beanR1));
AllotResultParam allotResultParam = new AllotResultParam();
allotResultParam.setRisId("1000002247");
allotResultParam.setExecutorWorkNo("17364505242");
allotResultParam.setAssistantWorkNo("17364505242");
allotResultParam.setReason("转派原因");
allotResultParam.setAppointmentStartTime(1698217015000L);
allotResultParam.setAppointmentEndTime(1698217020000L);
BeanR<?> beanR = beanRemoteService.allotResultUpdate(accessToken, allotResultParam);
log.info("[服务工单派单结果更新]【/api/openapi/task/updateAllotResult】返回值-------------------->{}", JsonUtil.toJson(beanR));
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!