| | |
| | | using WIDESEA.Core.ManageUser; |
| | | using WIDESEA.Entity.DomainModels; |
| | | using WIDESEA.Services.Repositories; |
| | | using static WIDESEA_Entity.CustomModels.RGVModel.RgvDeviceStatusModel; |
| | | |
| | | namespace WIDESEA.Services.Services |
| | | { |
| | |
| | | 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) |
| | |
| | | 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) |
| | |
| | | } |
| | | else |
| | | weighingResult = 1; |
| | | } |
| | | else // èä½¼å çå¦å夿 |
| | | { |
| | | weighingResult = 1; |
| | | } |
| | | |
| | | Dt_container_head conHead = new Dt_container_head(); |
| | |
| | | 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 = "æªæµé"; |