kazelee
昨天 f8d23dcf8d6501482db1a5180325194232afe96c
api/ApiModel.cs
@@ -17,16 +17,14 @@
            public List<object> result { get; set; } = new List<object>();
        }
        /// <summary>
        /// 构建 <see cref="SimpleResult"/> 返回值
        /// </summary>
        /// <param name="code"></param>
        /// <param name="message"></param>
        /// <param name="log"></param>
        /// <returns></returns>
        public static SimpleResult NewSimpleResult(int code, string message, bool log = true) {
            if (log) { LogHelper.Info(message); }
        public static SimpleResult NewSimpleResult(int code, string message, string name = "") {
            LogHelper.Info(message, name);
            return new SimpleResult { resultCode = code, resultMsg = message };
        }
        public static SimpleResult NewSimpleResult(Exception ex, string preLog = "", int errCode = -1) {
            LogHelper.InfoEx(ex, preLog);
            return new SimpleResult { resultCode = errCode, resultMsg = $"发生了[异常]:{ex.Message}" };
        }
        /// <summary>
@@ -60,7 +58,7 @@
            //public int station_id { get; set; }
            /// <summary>
            /// 请求上线/下线的的站台库位名称,例如work6、work8
            /// 请求上线/下线的的站台库位名称,例如work6,work8
            /// </summary>
            public string station_name { get; set; }
@@ -79,7 +77,8 @@
            public string ResultMsg { get; set; }
        }
        public static ReturnResult NewReturnResult(int code, string message) {
        public static ReturnResult NewReturnResult(int code, string message, bool log = true) {
            if (log) { LogHelper.Info(message); }
            return new ReturnResult { ResultCode = code, ResultMsg = message };
        }
@@ -176,7 +175,7 @@
            [JsonProperty("n_num")]
            public int Num { get; set; }
            /// <summary>
            /// 起点货位信息(起点货位货区要求:MXCZQ 满箱操作区)
            /// 起点货位信息 (起点货位货区要求:MXCZQ 满箱操作区)
            /// </summary>
            [JsonProperty("s_start_loc")]
            public string StartLoc { get; set; }
@@ -192,17 +191,17 @@
            [JsonProperty("cntr_code")]
            public string CntrCode { get; set; }
            /// <summary>
            /// 容器类型(必须为 '空托盘’ 或 ‘空好运箱')
            /// 容器类型 (必须为 '空托盘’ 或 ‘空好运箱')
            /// </summary>
            [JsonProperty("cntr_type")]
            public string CntrType { get; set; }
            /// <summary>
            /// 终点库区编码(托盘是 KTCFQ 空托存放区;好运箱是 CXHJQ 空箱货架区)
            /// 终点库区编码 (托盘是 KTCFQ 空托存放区;好运箱是 CXHJQ 空箱货架区)
            /// </summary>
            [JsonProperty("end_area")]
            public string EndArea { get; set; }
            /// <summary>
            /// 起点货位(托盘是 KTJBQ 空托入库接驳区;好运箱是 KXJBQ 空箱入库接驳区)
            /// 起点货位 (托盘是 KTJBQ 空托入库接驳区;好运箱是 KXJBQ 空箱入库接驳区)
            /// </summary>
            [JsonProperty("start_loc")]
            public string StartLoc { get; set; }
@@ -274,7 +273,7 @@
            [JsonProperty("cntr_code")]
            public string CntrCode { get; set; }
            /// <summary>
            /// 不合格移库终点库区(必须是 CJYCQ 抽检异常区)
            /// 不合格移库终点库区 (必须是 CJYCQ 抽检异常区)
            /// </summary>
            [JsonProperty("end_area")]
            public string EndArea { get; set; }
@@ -367,17 +366,17 @@
            [JsonProperty("qualityGrade")]
            public string QualityGrade { get; set; }
            /// <summary>
            /// 料箱编号(待定)
            /// 料箱编号 (待定)
            /// </summary>
            [JsonProperty("cntrCode")]
            public string CntrCode { get; set; }
            /// <summary>
            /// 物料数量(待定)
            /// 物料数量 (待定)
            /// </summary>
            [JsonProperty("itemNum")]
            public int ItemNum { get; set; }
            ///// <summary>
            ///// 产线号(待定,好运箱有2条产线,对应2个下线货位,这里暂定为:3和4)
            ///// 产线号 (待定,好运箱有2条产线,对应2个下线货位,这里暂定为:3和4)
            ///// </summary>
            //[JsonProperty("prodLineId")]
            //public string ProdLineId { get; set; }
@@ -394,13 +393,13 @@
            public int Result { get; set; }
            /// <summary>
            /// 是否成功 True-成功,False:失败
            /// 是否成功 True-成功,False:失败
            /// </summary>
            [JsonProperty("success")]
            public bool Success { get; set; }
            /// <summary>
            /// 这里是string类型,对结果的描述
            /// 这里是string类型,对结果的描述
            /// </summary>
            [JsonProperty("data")]
            public string Data { get; set; }
@@ -417,7 +416,7 @@
            if (log) { LogHelper.Info(message); }
            return new MesResult {
                Result = code,
                Success = code == 0, // 仅当code=0时,success=true
                Success = code == 0, // 仅当code=0时,success=true
                Data = message,
            };
        }
@@ -442,7 +441,7 @@
        /// </summary>
        public class ErpSendOutboundPlanInfo {
            /// <summary>
            /// 计划单号(唯一标识)
            /// 计划单号 (唯一标识)
            /// </summary>
            public string jhdh { get; set; } = string.Empty;
@@ -704,7 +703,7 @@
        public class PickUpReturnErpInfo {
            /// <summary>
            /// 计划单号(唯一标识)
            /// 计划单号 (唯一标识)
            /// </summary>
            public string jhdh { get; set; }
@@ -966,7 +965,7 @@
        public class CreateTaskReturnErpInfo {
            /// <summary>
            /// 计划单号(唯一标识)
            /// 计划单号 (唯一标识)
            /// </summary>
            public string jhdh { get; set; }