| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194 |
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Text;
- namespace Wms.Screen.Dto.ZhongTian.Response
- {
- public class LocationUsageReportViewDto
- {
- /// <summary>
- /// 序号:从1开始顺序
- /// </summary>
- [Description("序号")]
- public int Sort { get; set; }
- /// <summary>
- /// 仓库类型
- /// </summary>
- [Description("仓库类型")]
- public string WarehouseName { get; set; }
- /// <summary>
- /// 巷道
- /// </summary>
- [Description("巷道")]
- public string Tunnel { get; set; }
- /// <summary>
- /// 楼层
- /// </summary>
- [Description("楼层")]
- public string Floor { get; set; }
- /// <summary>
- /// 巷道入库状态
- /// </summary>
- [Description("巷道入库状态")]
- public string InStates { get; set; }
- /// <summary>
- /// 巷道出库状态
- /// </summary>
- [Description("巷道出库状态")]
- public string OutStates { get; set; }
- /// <summary>
- /// 总货位
- /// </summary>
- [Description("总货位")]
- public int AllLocationTotal { get; set; }
- /// <summary>
- /// 有效货位
- /// </summary>
- [Description("有效货位")]
- public int CanUseLocation { get; set; }
- private int _SpareLocation;
- /// <summary>
- /// 空余货位
- /// </summary>
- [Description("空余货位")]
- public int SpareLocation
- {
- get
- {
- return CanUseLocation - MaterilLocation - ContainLocation - LockLocation;
- }
- set { _SpareLocation = value; }
- }
- /// <summary>
- /// 有料货位
- /// </summary>
- [Description("有料货位")]
- public int MaterilLocation { get; set; }
- /// <summary>
- /// 有容器货位
- /// </summary>
- [Description("有容器货位")]
- public int ContainLocation { get; set; }
- /// <summary>
- /// 锁定货位
- /// </summary>
- [Description("锁定货位")]
- public int LockLocation { get; set; }
- /// <summary>
- /// 停用货位
- /// </summary>
- [Description("停用货位")]
- public int StopLocation
- {
- get; set;
- }
- /// <summary>
- /// 货位使用率
- /// </summary>
- [Description("货位使用率")]
- public string MaterialUsage
- {
- get
- {
- string res = "0%";
- //如果有料货位大于0,总货位大于0,则根据有料货位/总货位计算货位使用率
- if (MaterilLocation > 0 && AllLocationTotal > 0)
- {
- //转为百分比,保留2位
- res = (MaterilLocation / (AllLocationTotal * 1.0)).ToString("P2");
- }
- return res;
- }
- }
- [Description("黄色预警货位使用率")]
- public int LocYWarnVal
- {
- get; set;
- }
- [Description("红色预警货位使用率")]
- public int LocRWarnVal
- {
- get; set;
- }
- /// <summary>
- /// 行显示颜色
- /// </summary>
- [Description("行显示颜色")]
- public string LocRowColor
- {
- get
- {
- var rate = MaterilLocation / (AllLocationTotal * 1.0) * 100;
- string res = "";
- if (rate >= LocRWarnVal)
- {
- res = "Red";
- }
- else if (rate >= LocYWarnVal)
- {
- res = "Yellow";
- }
- return res;
- }
- }
- }
- public class ZtLocationUsageReportViewDto : LocationUsageReportViewDto
- {
- /// <summary>
- /// 空余小货位
- /// </summary>
- [Description("空余小货位")]
- public int LittleSizeLocation
- {
- get; set;
- }
- /// <summary>
- /// 空余大货位
- /// </summary>
- [Description("空余大货位")]
- public int BigSizeLocation
- {
- get
- {
- return SpareLocation - LittleSizeLocation;
- }
- }
- }
- public class TunnelDto
- {
- public string WareHouseName { get; set; }
- public string Tunnel { get; set; }
- public string Floor { get; set; }
- public string Statu { get; set; }
- public string StatuName { get; set; }
- public string Code { get; set; }
- public string Name { get; set; }
- public string SContent { get; set; }
- public string SType { get; set; }
- public string Default1 { get; set; }
- public string Default2 { get; set; }
- public string Default3 { get; set; }
- public string Id { get; set; }
- public string Memo { get; set; }
- public string AddWho { get; set; }
- public string EditWho { get; set; }
- public DateTime AddTime { get; set; }
- public DateTime EditTime { get; set; }
- }
- }
|