xiaojiao
8 小时以前 557f02072fa311eefe3123aa44afebac22adc465
ÏîÄ¿´úÂë/WMS/WIDESEA_WMSServer/WIDESEA.Services/Common/AddBoxContainer.cs
@@ -5,6 +5,7 @@
using WIDESEA.Core.ManageUser;
using WIDESEA.Entity.DomainModels;
using WIDESEA.Services.Repositories;
using static WIDESEA_Entity.CustomModels.RGVModel.RgvDeviceStatusModel;
namespace WIDESEA.Services.Services
{
@@ -31,6 +32,7 @@
                throw new Exception($"没有找到对任务托盘号:【{taskInfo.task_barcode}】对应的空托盘出库记录");
            //0不合格,1合格
            int weighingResult = 0;
            decimal Standard_value_NumResult = 0; //标准值计算结果
            Dt_weighing_standards standars = Dt_weighing_standardsRepository.Instance.FindFirst(r => r.weighing_materiel_id == boxDetail.boxdtl_materielid &&
                     r.weighing_bearing_id == boxDetail.boxdtl_type && r.weighing_manufacturer == goodsInfo.mesInfo_madeUnit && r.weighing_type == goodsInfo.mesInfo_standard);
            if (null != standars)
@@ -42,7 +44,9 @@
                if (standars.weighing_isCompute == 1)
                {
                    //差异值  
                    decimal differencWeiging = standars.weighing_standard_value.GetValueOrDefault() - currentWeighing;
                    // decimal differencWeiging = standars.weighing_standard_value.GetValueOrDefault() - currentWeighing;
                    decimal differencWeiging = int.Parse(goodsInfo.mesInfo_bak_3) - currentWeighing; // è‚–佼修成
                    Standard_value_NumResult = differencWeiging; // æ ‡å‡†å€¼è®¡ç®—结果赋值
                    if (differencWeiging < 0)
                    {
                        if (standars.weighing_positive_value >= -differencWeiging)
@@ -56,6 +60,10 @@
                }
                else
                    weighingResult = 1;
            }
            else // è‚–佼加的否则判断
            {
                weighingResult = 1;
            }
            Dt_container_head conHead = new Dt_container_head();
@@ -82,11 +90,25 @@
            conDetail.containerdtl_madeUnit = goodsInfo.mesInfo_madeUnit;
            conDetail.containerdtl_number = goodsInfo.mesInfo_number;
            conDetail.containerdtl_goodsCode = goodsInfo.mesInfo_qrCode;
            conDetail.containerdtl_goodsWeight = ((decimal.Parse(taskInfo.task_weight) - decimal.Parse(dt_EmptyPallet.EmptyPallet_palletweight))
                + standars.weighing_addWeighing.GetValueOrDefault()).ToString();
            conDetail.Standard_value = goodsInfo.mesInfo_bak_3; // è‚–佼加上这个
            conDetail.Placeoforigin = goodsInfo.mesInfo_bak_4; // è‚–佼加上这个
            conDetail.Standard_value_NumResult = Standard_value_NumResult.ToString();
            conDetail.containerdtl_goodsWeight = "0"; // è‚–佼加上了这个if 92 - 100行
            if (standars != null)
            {
                if (standars.weighing_isCompute == 1)
                {
                    conDetail.containerdtl_goodsWeight = ((decimal.Parse(taskInfo.task_weight) - decimal.Parse(dt_EmptyPallet.EmptyPallet_palletweight))
                    + standars.weighing_addWeighing.GetValueOrDefault()).ToString();
                }
            }
            conDetail.containerdtl_creator = taskInfo.task_creator;
            conDetail.containerdtl_createtime = DateTime.Now;
            conDetail.containerdtl_text1 = "未测量";
            conDetail.containerdtl_text3 = "未复检";
            //称重结果
            conDetail.containerdtl_standardResult = weighingResult;