| | |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "StoreTime", ColumnDescription = "存储期至")] |
| | | public DateTime? StoreTime { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 抽检标记 |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "InsPectMark", ColumnDescription = "抽检标记", Length = 3)] |
| | | public string? InsPectMark { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 零箱标记 |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "BitBoxMark", ColumnDescription = "零箱标记", Length = 3)] |
| | | public string? BitBoxMark { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 箱码 |
| | | /// </summary> |
| | |
| | | [SugarColumn(ColumnName = "EndLotFlag", ColumnDescription = "结批标识", Length = 3)] |
| | | public string? EndLotFlag { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 总件数 |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "QtyCount", ColumnDescription = "总件数")] |
| | | public int? QtyCount { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 第几件 |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "QtyOrd", ColumnDescription = "第几件")] |
| | | public int? QtyOrd { get; set; } |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// 状态 |
| | | /// </summary> |
| | | [SugarColumn(ColumnName = "Status", ColumnDescription = "状态", Length = 3)] |
| | | public string? Status { get; set; } |
| | | |
| | | } |
| | |
| | | public List<ResponseTasksModel> TaskList { get; set; } |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 返回赋码系统响应参数 |
| | | /// </summary> |
| | | public class ResponseFuMaModel |
| | | { |
| | | /// <summary> |
| | | /// 状态码 0成功 -1:失败 |
| | | /// </summary> |
| | | public string Success { get; set; } |
| | | /// <summary> |
| | | /// 提示信息 |
| | | /// </summary> |
| | | public string Message { get; set; } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 赋码系统推送箱码信息 |
| | | /// </summary> |
| | | public class FumaBoxInfoInput |
| | | { |
| | | /// <summary> |
| | | /// 箱码 |
| | | /// </summary> |
| | | public string BoxNo { get; set; } |
| | | /// <summary> |
| | | /// 单据号 |
| | | /// </summary> |
| | | public string OrderNo { get; set; } |
| | | /// <summary> |
| | | /// 物料编码 |
| | | /// </summary> |
| | | public string SkuNo { get; set; } |
| | | /// <summary> |
| | | /// 物料名称 |
| | | /// </summary> |
| | | public string SkuName { get; set; } |
| | | /// <summary> |
| | | /// 物料规格 |
| | | /// </summary> |
| | | public string Standard { get; set; } |
| | | /// <summary> |
| | | /// 批次号 |
| | | /// </summary> |
| | | public string LotNo { get; set; } |
| | | /// <summary> |
| | | /// 数量 |
| | | /// </summary> |
| | | public decimal Qty { get; set; } |
| | | /// <summary> |
| | | /// 满箱数量 |
| | | /// </summary> |
| | | public decimal FullQty { get; set; } |
| | | /// <summary> |
| | | /// 供货商批次 |
| | | /// </summary> |
| | | public string SupplierLot { get; set; } |
| | | /// <summary> |
| | | /// 是否抽检箱 0否 1是 |
| | | /// </summary> |
| | | public string InsPectMark { get; set; } |
| | | /// <summary> |
| | | /// 是否零箱 0否 1是 |
| | | /// </summary> |
| | | public string BitBoxMark { get; set; } |
| | | /// <summary> |
| | | /// 质检状态 0待检(默认) 1合格 2不合格 |
| | | /// </summary> |
| | | public string InspectStatus { get; set; } |
| | | /// <summary> |
| | | /// 生产日期 |
| | | /// </summary> |
| | | public string ProductionTime { get; set; } |
| | | /// <summary> |
| | | /// 失效日期 |
| | | /// </summary> |
| | | public string ExpirationTime { get; set; } |
| | | /// <summary> |
| | | /// 储存期至 |
| | | /// </summary> |
| | | public string StoreTime { get; set; } |
| | | /// <summary> |
| | | /// 来源 固定值[赋码] |
| | | /// </summary> |
| | | public string Origin { get; set; } |
| | | /// <summary> |
| | | /// 结批标识 0/空:否 1:是 |
| | | /// </summary> |
| | | public string EndBatchMark { get; set; } |
| | | /// <summary> |
| | | /// 箱内明细 |
| | | /// </summary> |
| | | public List<BoxList> DelistList { get; set; } |
| | | |
| | | } |
| | | |
| | | public class BoxList |
| | | { |
| | | /// <summary> |
| | | /// 盒码 |
| | | /// </summary> |
| | | public string BoxNo2 { get; set; } |
| | | /// <summary> |
| | | /// 支码集合 |
| | | /// </summary> |
| | | public List<BoxList2> DelistList2 { get; set; } |
| | | } |
| | | |
| | | public class BoxList2 |
| | | { |
| | | /// <summary> |
| | | /// 支码 |
| | | /// </summary> |
| | | public string BoxNo3 { get; set; } |
| | | /// <summary> |
| | | /// 数量 |
| | | /// </summary> |
| | | public decimal Qty { get; set; } |
| | | /// <summary> |
| | | /// 总件数 |
| | | /// </summary> |
| | | public int? QtyCount { get; set; } |
| | | /// <summary> |
| | | /// 第几件 |
| | | /// </summary> |
| | | public int? QtyOrd { get; set; } |
| | | } |
| | | |
| | |
| | | using Elastic.Clients.Elasticsearch; |
| | | using DocumentFormat.OpenXml.Presentation; |
| | | using Elastic.Clients.Elasticsearch; |
| | | using Furion.Logging; |
| | | using Newtonsoft.Json; |
| | | using System; |
| | | using System.Diagnostics.CodeAnalysis; |
| | | using System.Linq; |
| | | using System.Text; |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// WCS接受赋码系统推送的箱码信息 |
| | | /// </summary> |
| | | /// <param name="models">箱码信息</param> |
| | | /// <returns>反馈信息</returns> |
| | | [HttpPost] |
| | | [AllowAnonymous] |
| | | public ResponseFuMaModel AddHttpBoxInfo(FumaBoxInfoInput models) |
| | | { |
| | | |
| | | try |
| | | { |
| | | string str = JsonConvert.SerializeObject(models); |
| | | Log.Information("接收赋码推送的箱码信息:"+str); |
| | | if (models.Origin != "赋码") |
| | | { |
| | | throw new Exception("来源未识别"); |
| | | } |
| | | var num = _db.Queryable<WcsBoxInfo>().Where(m=>m.BoxNo == models.BoxNo && m.IsDelete == false).ToList(); |
| | | var type = "add"; |
| | | if (num.Count>0) |
| | | { |
| | | //WCS存在箱码信息,更新箱码信息(需判断箱码是否已组盘入库) |
| | | var num2 = num.Count(m => m.Status != "0" || !string.IsNullOrWhiteSpace(m.PalletNo)); |
| | | if (num2 > 0) |
| | | { |
| | | throw new Exception("该箱已入盘入库,不可更新信息"); |
| | | } |
| | | type = "edit"; |
| | | } |
| | | |
| | | if (models.DelistList.Count == 0) |
| | | { |
| | | throw new Exception("盒码集合不能为空"); |
| | | } |
| | | |
| | | var listBox = new List<WcsBoxInfo>(); |
| | | foreach (var item in models.DelistList) |
| | | { |
| | | var level = "3"; |
| | | if (string.IsNullOrWhiteSpace(item.BoxNo2)) |
| | | { |
| | | level = "2"; |
| | | } |
| | | if (item.DelistList2.Count == 0) |
| | | { |
| | | throw new Exception("值码集合不能为空"); |
| | | } |
| | | //二级码 |
| | | foreach (var item2 in item.DelistList2) |
| | | { |
| | | if (string.IsNullOrWhiteSpace(models.ProductionTime) || string.IsNullOrWhiteSpace(models.ExpirationTime)) |
| | | { |
| | | throw new Exception("生产日期或失效日期不能为空"); |
| | | } |
| | | DateTime proTime; |
| | | DateTime expTime; |
| | | var isValid = DateTime.TryParse(models.ProductionTime, out proTime); |
| | | var isValid2 = DateTime.TryParse(models.ExpirationTime, out expTime); |
| | | if (!isValid || !isValid2) |
| | | { |
| | | throw new Exception("生产日期或失效日期格式错误"); |
| | | }; |
| | | |
| | | var boxAdd = new WcsBoxInfo() |
| | | { |
| | | BoxNo = models.BoxNo, |
| | | //OrderNo = models.OrderNo, |
| | | SkuNo = models.SkuNo, |
| | | SkuName = models.SkuName, |
| | | Standard = models.Standard, |
| | | LotNo = models.LotNo, |
| | | Qty = item2.Qty, |
| | | FullQty = models.FullQty, |
| | | //SupplierLot = models.SupplierLot, |
| | | InsPectMark = models.InsPectMark, |
| | | BitBoxMark = models.BitBoxMark, |
| | | //InspectStatus = models.InspectStatus, |
| | | ProductionTime = proTime, |
| | | ExpirationTime = expTime, |
| | | StoreTime = DateTime.Parse(models.StoreTime), |
| | | EndLotFlag = string.IsNullOrWhiteSpace(models.EndBatchMark) ? "0" : models.EndBatchMark, |
| | | |
| | | BoxNo2 = item.BoxNo2, |
| | | BoxNo3 = item2.BoxNo3, |
| | | QtyCount = item2.QtyCount, |
| | | QtyOrd = item2.QtyOrd, |
| | | |
| | | Status = "0", |
| | | Level = level, |
| | | |
| | | IsDelete = false |
| | | }; |
| | | listBox.Add(boxAdd); |
| | | } |
| | | |
| | | } |
| | | _db.Insertable(listBox).ExecuteCommand(); |
| | | if (type == "edit") |
| | | { |
| | | //gen |
| | | _db.Deleteable(num).ExecuteCommand(); |
| | | return new ResponseFuMaModel() { Success = "0", Message = "更新成功" }; |
| | | } |
| | | return new ResponseFuMaModel() { Success = "0", Message = "插入成功" }; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | return new ResponseFuMaModel() { Success = "-1", Message = ex.Message }; |
| | | } |
| | | } |
| | | |
| | | } |
| | |
| | | /// <returns></returns> |
| | | public static PLCUtil GetPlcIp(string startStation) |
| | | { |
| | | startStation = startStation.PadLeft(3, '0'); |
| | | string strIp = ""; |
| | | var conveyList1 = new List<string>() { "147", "145", "139", "137", "129", "127", "121", "119", "111", "109", "103", "101", "093", "091", "085", "083", "075", "073", "067", "065","033","039","044" ,"051","059"}; |
| | | var conveyList2 = new List<string>() { "205", "234", "252", "254", "260", "262", "270", "272", "278", "280", "288", "290", "294", "301", "307", "309", "315", "317", "325", "327", "331", "337" }; |
| | |
| | | /// <returns>跺机联机</returns> |
| | | public static string GetRoadwayByStation(string StationNum) |
| | | { |
| | | StationNum = StationNum.PadLeft(3, '0'); |
| | | |
| | | string value = ""; |
| | | var conveyList1 = new List<string>() { "147", "145", "252", "254", "401", "402", }; |
| | | var conveyList2 = new List<string>() { "139", "137", "260", "262", "405", "406", }; |
| | |
| | | </el-col> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUI"> |
| | | <el-form-item label="任务号"> |
| | | <el-input v-model="queryParams.taskNo" clearable="" placeholder="请输入任务号" /> |
| | | <el-input v-model="queryParams.taskNo" clearable="" placeholder=" " /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUI"> |
| | |
| | | </template> |
| | | <el-form :model="queryParams2" ref="queryForm2" labelWidth="90"> |
| | | <el-row> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10"> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="10" :xl="8" class="mb10"> |
| | | <el-form-item label="任务号"> |
| | | <el-input v-model="queryParams2.taskNo" clearable="" placeholder="请输入任务号"style="width: 130px;" /> |
| | | <el-input v-model="queryParams2.taskNo" clearable="" placeholder="请输入任务号" style="width: 130px;" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" style="margin-left: 20px;"> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="10" :xl="8" class="mb10" style="margin-left: 20px;"> |
| | | <el-form-item> |
| | | <el-button type="primary" icon="ele-Search" @click="handleQuery2"> 查询 |
| | | </el-button> |
| | |
| | | :deep(.el-input-number) { |
| | | width: 100%; |
| | | } |
| | | |
| | | /* :deep(.el-input__inner) |
| | | { |
| | | width: 50%; |
| | | } */ |
| | | </style> |