dengjunjie
2026-02-27 b6a82cb656a6cd045d772274ae927c8ca2c22b06
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEAWCS_Core;
using WIDESEAWCS_Core.Helper;
using WIDESEAWCS_DTO.WMS;
 
namespace WIDESEAWCS_TaskInfoService
{
    public class TaskHelpMethods
    {
        public static WebResponseContent isOkTaskInfo(TaskDTO taskDTO, bool isfrom, bool isType)
        {
            WebResponseContent content = new WebResponseContent().OK();
            try
            {
                if (taskDTO.containerCode.IsNullOrEmpty()) throw new Exception("料箱号不能为空");
                if (taskDTO.toAreaCode.IsNullOrEmpty() && taskDTO.toLocationCode.IsNullOrEmpty()) throw new Exception("终点区域或终点位置不能为空");
                //if (isType) if (taskDTO.containerType.IsNullOrEmpty()) throw new Exception("料箱类型不能为空");
                if (isfrom) if (taskDTO.fromLocationCode.IsNullOrEmpty()) throw new Exception("起点位置不能为空");
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
            return content;
        }
    }
}