| | |
| | | if (boxHead == null || boxDetail == null || goodsInfo == null) |
| | | throw new Exception($"æ²¡ææ¾å°å¯¹ä»»å¡æçå·ï¼ã{taskInfo.task_barcode}ã对åºçç»çä¿¡æ¯æè
æ¯å½å
¥ä¿¡æ¯"); |
| | | |
| | | //è¿éæ¯è·å空æçééï¼è°è¯å æ¶æ³¨é |
| | | Dt_container_head_hty container_Head_Hty = Dt_container_head_htyRepository.Instance.Find(x => x.containerhead_barcode == taskInfo.task_barcode |
| | | && x.containerhead_operatetype == "empty" && x.containerhead_creator != "WCS" && !string.IsNullOrEmpty(x.containerhead_palletweight) && "0" != x.containerhead_palletweight) |
| | | .OrderByDescending(x => x.containerhead_finishtime).First(); |
| | | |
| | | |
| | | //è¿éè·å空æççéé |
| | | Dt_EmptyPallet dt_EmptyPallet = Dt_EmptyPalletRepository.Instance.Find(x => x.EmptyPallet_name == taskInfo.task_barcode).First(); |
| | | |
| | | |
| | | if (container_Head_Hty == null) |
| | | if (dt_EmptyPallet == null) |
| | | throw new Exception($"æ²¡ææ¾å°å¯¹ä»»å¡æçå·ï¼ã{taskInfo.task_barcode}ã对åºç空æçåºåºè®°å½"); |
| | | //0ä¸åæ ¼,1åæ ¼ |
| | | int weighingResult = 0; |
| | |
| | | if (null != standars) |
| | | { |
| | | //å½åè½´æ¿ |
| | | decimal currentWeighing = (decimal.Parse(taskInfo.task_weight) - decimal.Parse(container_Head_Hty.containerhead_palletweight)) |
| | | decimal currentWeighing = (decimal.Parse(taskInfo.task_weight) - decimal.Parse(dt_EmptyPallet.EmptyPallet_palletweight)) |
| | | + standars.weighing_addWeighing.GetValueOrDefault(); |
| | | //æ¯å¦è®¡ç® |
| | | if (standars.weighing_isCompute == 1) |
| | |
| | | conHead.containerhead_barcode = taskInfo.task_barcode; |
| | | conHead.containerhead_creator = taskInfo.task_creator; |
| | | conHead.containerhead_createtime = DateTime.Now; |
| | | conHead.containerhead_palletweight = container_Head_Hty.containerhead_palletweight; |
| | | conHead.containerhead_palletweight = dt_EmptyPallet.EmptyPallet_palletweight; |
| | | Dt_container_headRepository.Instance.Add(conHead, true); |
| | | |
| | | Dt_container_detail conDetail = new Dt_container_detail(); |
| | |
| | | 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(container_Head_Hty.containerhead_palletweight)) |
| | | 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; |