using iWareSAP.IDOC.Entity;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using UtilDll.UTIL;
namespace iWareSAP.PARAM.Entity
{
public class PickListEntity
{
///
/// 1ERP订单号
///
public string storeOrderCode { get; set;}
///
/// 2状态
///
public string statusText { get; set;}
///
/// 3出库类型
///
public string orderType { get; set;}
///
/// 4货主编号
///
public string consignorCode { get; set;}
///
/// 5货主ID
///
public string consignor_Id { get; set;}
///
/// 6货主名称
///
public string consignorName { get; set;}
///
/// 7仓库ID
///
public int storage_Id { get; set;}
///
/// 8仓库名称
///
public string storageName { get; set;}
///
/// 9客户编号
///
public string clientCode { get; set;}
///
/// 10 客户名称
///
public string clientShortName { get; set;}
///
/// 11销售金额
///
public int grandTotal { get; set;}
///
/// 12折后金额
///
public int subTotal {get; set;}
///
/// 13经手人
///
public string userTrueName {get; set;}
///
/// 14手机号
///
public string mobile {get; set;}
///
/// 15省
///
public string provinceName {get; set;}
///
/// 16市
///
public string cityName {get; set;}
///
/// 17地区
///
public string regionName {get; set;}
///
/// 18收货人
///
public string shippingName {get; set;}
///
/// 19收货地址
///
public string shippingAddress {get; set;}
///
/// 20备注
///
public string remark {get; set;}
///
/// 21摘要
///
public string summary {get; set;}
///
/// 22下单时间
///
//public DateTime applyDateSys {get; set;}
///
/// 22下单时间
///
public string applyDate { get; set; }
///
/// 23快递费用
///
public int shippingAmount{get; set;}
///
/// 24快递单号
///
public string expressCode {get; set;}
///
/// 25快递公司
///
public string expressCorpName {get; set;}
///
/// 26优惠金额
///
public int discountAmount {get; set;}
///
/// 27电话
///
public string telephone {get; set;}
///
/// 28产品编号
///
public string cpbianhao {get; set;}
///
/// 29产品名称
///
public string cpmingcheng {get; set;}
///
/// 30产品型号
///
public string cpxinghao {get; set;}
///
/// 出库单明细
///
public List details { get; set; }
///
/// 构造函数
///
public PickListEntity()
{
var applyDateSys = DateTime.Now;
applyDate = applyDateSys.ToString("yyyy-MM-dd");
statusText = "未知";
consignorCode = "未知";
storageName = "未知";
clientCode = "未知";
clientShortName = "未知";
mobile = "未知";
provinceName = "未知";
cityName = "未知";
regionName = "未知";
shippingName = "未知";
shippingAddress = "未知";
details = new List();
}
///
/// 构造函数
///
public PickListEntity(PickList pickList)
{
storeOrderCode = pickList.AUFNR;//单号
orderType = pickList.BWART;//移动类型
var applyDateSys = string.IsNullOrEmpty(pickList.BDTER) ? DateTime.Now : Convert.ToDateTime(StringHelper.ConvertDateTimeStr(pickList.BDTER));//出库日期
remark = pickList.AUFNR;//单号
applyDate = applyDateSys.ToString("yyyy-MM-dd");
statusText = "未知";
consignorCode = "HZ20180002";
consignor_Id = "30";
consignorName = "默认货主";
storageName = "未知";
clientCode = "未知";
clientShortName = "未知";
userTrueName = "未知";
mobile = "13686866686";
provinceName = "未知";
cityName = "未知";
regionName = "未知";
shippingName = "未知";
shippingAddress = "未知";
summary = "无";
expressCode = "未知";
expressCorpName = "未知";
telephone = "13686866686";
cpbianhao = "未知";
cpmingcheng = "未知";
cpxinghao = "未知";
details = new List();
}
public override string ToString()
{
var materialsStr = "";
foreach (var material in details)
{
materialsStr += material.ToString() + "\r\n";
}
return string.Format("storeOrderCode(ERP订单号,单号)={0},statusText(状态)={1},orderType(出库类型,移动类型)={2},consignorCode(货主编号)={3},consignor_Id(货主ID)={4},consignorName(货主名称)={5},storage_Id(仓库ID)={6},storageName(仓库名称)={7},clientCode(客户编号)={8},clientShortName(客户名称)={9},grandTotal(销售金额)={10},subTotal(折后金额)={11},userTrueName(经手人)={12},mobile(手机号)={13},provinceName(省)={14},cityName(市)={15},regionName(地区)={16},shippingName(收货人)={17},shippingAddress(收货地址)={18},remark(备注)={19},summary(摘要)={20},applyDate(下单时间)={21},shippingAmount(快递费用)={22},expressCode(快递单号)={23},expressCorpName(快递公司)={24},discountAmount(优惠金额)={25},telephone(电话)={26},cpbianhao(产品编号)={27},cpmingcheng(产品名称)={28},cpxinghao(产品型号)={29}, \r\ndetails=\r\n{30}", storeOrderCode, statusText, orderType, consignorCode, consignor_Id, consignorName, storage_Id, storageName, clientCode, clientShortName, grandTotal, subTotal, userTrueName, mobile, provinceName, cityName, regionName, shippingName, shippingAddress, remark, summary, applyDate, shippingAmount, expressCode, expressCorpName, discountAmount, telephone, cpbianhao, cpmingcheng, cpxinghao, materialsStr);
}
}
}