旧版报表、仓库
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

92 lines
2.3 KiB

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Warehouse.Models.mesModel;
using AutoMapper;
namespace Warehouse.Models.DTO
{
/// <summary>
/// 功率挡位范围
/// </summary>
public class PowerRangeDto
{
public short powergrade { get; set; }
public decimal lower { get; set; }
public decimal upper { get; set; }
}
public class CurrentRangeDto
{
public short powergrade { get; set; }
public string currentgrade { get; set; }
public decimal lower { get; set; }
public decimal upper { get; set; }
}
public class WorkOrderDto
{
public string workorder { get; set; }
public string workshop { get; set; }
public string products { get; set; }
public int planQty { get; set; }
public int warnningQty { get; set; }
public int workorderQty { get; set; }
public string crystalType { get; set; }
public string saleType { get; set; }
public string moduleType { get; set; }
public string cellType { get; set; }
public string workorderType { get; set; }
public string sale { get; set; }
public string oemCustomer { get; set; }
public string customer { get; set; }
public Int16? powerRule { get; set; }
public string cellQty { get; set; }
public string moduleColor { get; set; }
public string gridLineType { get; set; }
public DateTime startDate { get; set; }
public DateTime? endDate { get; set; }
}
public class PowerRangeResolver : IValueResolver<config_power, PowerRangeDto, short>
{
public short Resolve(config_power source, PowerRangeDto destination, short menber, ResolutionContext context)
{
PowerRangeDto PRObj = new PowerRangeDto();
PRObj.powergrade = source.power_grade;
return PRObj.powergrade;
}
}
public class Source
{
public int Value1 { get; set; }
public int Value2 { get; set; }
}
public class Destination
{
public int Total { get; set; }
}
public class CustomResolver : IValueResolver<Source, Destination, int>
{
public int Resolve(Source source, Destination destination, int member, ResolutionContext context)
{
Destination dd = new Destination();
dd.Total = source.Value1 + source.Value2;
return dd.Total;
}
}
}