xiaojiao
2026-03-12 b174ea476eb1afd872985b2c261241a814e0185d
ÏîÄ¿´úÂë/WMS/WIDESEA_WMSServer/WIDESEA.Services/Common/GetZCInfo.cs
@@ -189,5 +189,101 @@
            return zcInfo;
        }
        public static object GetZCInfo2(Dt_container_size_info_hty size_info_hty, Dt_container_detail_hty detail_hty, string materiel, string barcode, string fcbAVG, string ydAVG, string zjAVG, string ldCode
            , string target, string direction,string materiel_id)
        {
            decimal fcbMes = string.IsNullOrEmpty(fcbAVG) ? 0 : decimal.Parse(fcbAVG);
            decimal fcbWms = string.IsNullOrEmpty(size_info_hty.csize_four_3) ? 0 : decimal.Parse(size_info_hty.csize_four_3);
            decimal fcbdiff = 0;
            if (fcbMes != 0 && fcbWms != 0)
                fcbdiff = fcbMes - fcbWms;
            decimal ydMes = string.IsNullOrEmpty(ydAVG) ? 0 : decimal.Parse(ydAVG);
            decimal ydWms = string.IsNullOrEmpty(size_info_hty.csize_three_3) ? 0 : decimal.Parse(size_info_hty.csize_three_3);
            decimal yddiff = 0;
            if (ydMes != 0 && ydWms != 0)
                yddiff = ydMes - ydWms;
            decimal zjMes = string.IsNullOrEmpty(zjAVG) ? 0 : decimal.Parse(zjAVG);
            decimal zjWms = string.IsNullOrEmpty(size_info_hty.csize_in_value) ? 0 : decimal.Parse(size_info_hty.csize_in_value);
            decimal zjdiff = 0;
            if (zjMes != 0 && zjWms != 0)
                zjdiff = zjMes - zjWms;
            //decimal fcbDiff = ((string.IsNullOrEmpty(fcbAVG) ? 0 : decimal.Parse(fcbAVG)) - (string.IsNullOrEmpty(container.csize_four_3) ? 0 : decimal.Parse(container.csize_four_3)));
            //decimal ydDiff = ((string.IsNullOrEmpty(ydAVG) ? 0 : decimal.Parse(ydAVG) - (string.IsNullOrEmpty(container.csize_three_3) ? 0 : decimal.Parse(container.csize_three_3))));
            //decimal zjdDiff = ((string.IsNullOrEmpty(zjAVG) ? 0 : decimal.Parse(zjAVG) - (string.IsNullOrEmpty(container.csize_in_value) ? 0 : decimal.Parse(container.csize_in_value))));
            dt_selectionRecord record = new dt_selectionRecord()
            {
                record_barcode = detail_hty.containerdtl_barcode,
                record_createTime = DateTime.Now,
                record_fcbAVG_diff = fcbdiff,
                record_fcbAVG_mes = fcbMes,
                record_fcbAVG_wms = fcbWms,
                record_id = Guid.NewGuid(),
                record_ldCode = ldCode,
                record_ldNumber = barcode,
                record_locationId = "手动选配,没有库位",
                record_madeUnit = detail_hty.containerdtl_madeUnit,
                record_materielId = materiel_id,
                record_materielNumber = detail_hty.containerdtl_goodsCode,
                record_materielType = detail_hty.containerdtl_type,
                record_standa = detail_hty.containerdtl_standard,
                record_userName = Core.ManageUser.UserContext.Current.UserTrueName,
                record_weight = string.IsNullOrEmpty(detail_hty.containerdtl_goodsWeight) ? 0 : decimal.Parse(detail_hty.containerdtl_goodsWeight),
                record_ydAVG_diff = yddiff,
                record_ydAVG_mes = ydMes,
                record_ydAVG_wms = ydWms,
                record_zjAVG_diff = zjdiff,
                record_zjAVG_mes = zjMes,
                record_zjAVG_wms = zjWms,
                record_direction = "left".Equals(direction) ? "左侧" : "右侧",
                record_outstation = "手动选配",
                record_inboundTime = "手动选配",
                record_lotNumber = "手动选配",
                record_ProductDate = "手动选配"
            };
            dt_selectionRecordRepository.Instance.Add(record, true);
            object zcInfo = new
            {
                wmsInfo = new List<object>(){
                new
                {
                    name = "轮对号",
                    value = ldCode,
                },
                new{
                    name = "轴承编号",
                    value = record.record_materielNumber,
                },
                new
                {
                    name = "轴承类别",
                    value = record.record_standa,
                },
                 new
                 {
                    name="轴承内径平均值",
                    value = record.record_zjAVG_wms,
                },
                new
                {
                    name = "轴承内径过盈量",
                    value = record.record_zjAVG_diff,
                },
                new
                {
                    name = "重量(克)",
                    value = record.record_weight,
                }
             }
            };
            return zcInfo;
        }
    }
}