package com.fuzamei.web;

import java.util.Map;

import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;

import com.alibaba.fastjson.JSON;
import com.fuzamei.baseTest.BaseJunit4Test;
import com.fuzamei.entity.Params;

public class CargoTallyActionTest extends BaseJunit4Test{
	
	@Autowired
	private CargoTallyAction cargoTallyAction;
	
	@Test//收货员查看订单信息
	public void test01(){
		Params params=new Params();
		params.setUserId(9011);
		params.setPage(1);
		params.setOrderId(100000001);
		params.setCarNo(null);
		params.setStartTime(null);
		params.setEndTime(null);
		Map<String, Object> result = cargoTallyAction.queryOrdersByReceiver(params);
		String jsonString = JSON.toJSONString(result,true);
		System.out.println(jsonString);
	}
	
	@Test//点击下一步查看订单信息
	public void test02(){
		Params params=new Params();
		params.setUserId(9011);
		params.setOrderId(100000001);
		Map<String, Object> result = cargoTallyAction.searchNewOrderByOrderId(params);
		String jsonString = JSON.toJSONString(result,true);
		System.out.println(jsonString);
	}
	
	@Test//查看订单跟踪信息
	public void test03(){
		Params params=new Params();
		params.setUserId(9012);
		params.setOrderId(100000001);
		Map<String, Object> result = cargoTallyAction.orderTracking(params);
		String jsonString = JSON.toJSONString(result,true);
		System.out.println(jsonString);
	}
	
	@Test//收货员点击收货或者拒收
	public void test04(){
		Params params=new Params();
		params.setUserId(9012);
		params.setOrderId(100000001);
		params.setConfirmId(1);
		Map<String, Object> result = cargoTallyAction.confirmOrReject(params);
		String jsonString = JSON.toJSONString(result,true);
		System.out.println(jsonString);
	}
	
}
