| | |
| | | using Newtonsoft.Json; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using WIDESEA.Common; |
| | | using WIDESEA.Core.Enums; |
| | |
| | | using WIDESEA.Services.IServices.ToApp; |
| | | using WIDESEA.Services.Repositories; |
| | | using WIDESEA.Services.Services; |
| | | using WIDESEA_Common.LogEnum; |
| | | using WIDESEA_Entity.DomainModels; |
| | | |
| | | |
| | |
| | | //çäº§æ¥æ |
| | | string ProductDate = saveModel.MainData["ProductDate"].ToString(); |
| | | |
| | | // æ åå¼ |
| | | string Standard_value = saveModel.MainData["Standard_value"].ToString(); |
| | | |
| | | // äº§å° |
| | | string Placeoforigin = saveModel.MainData["Placeoforigin"].ToString(); |
| | | |
| | | if (string.IsNullOrEmpty(madeUnit) || string.IsNullOrEmpty(materielId) || string.IsNullOrEmpty(materielType) || string.IsNullOrEmpty(NewOrOld)) |
| | | throw new Exception($"åå®¶/轮对/åå·/æ£ä¿®ç±»åé½ä¸è½ä¸ºç©º"); |
| | | |
| | |
| | | throw new Exception($"æçç :ã{rfid}ãå·²ç»åå¨äºç©ºæçåºåä¸,è´§ä½å·:{conInfoEmpty.location_id}"); |
| | | |
| | | //æ¥æ¾è¯¥æçæ¯å¦ä¹åå
¥è¿åºï¼ç»çè¿åºçæçä¹åå¿
须已ç»å
¥è¿åºç |
| | | Dt_container_head_hty head_Hty = Dt_container_head_htyRepository.Instance.FindFirst(x => x.containerhead_barcode == rfid); |
| | | if (head_Hty == null) |
| | | throw new Exception($"æçç :ã{rfid}ã该æçæ å
¥åºè®°å½ï¼æ æ³ç»çï¼è¯·å
å°å
¶ç©ºæçç¶æå
¥åºï¼å¨å¼å«ç©ºæçåºåºè¿è¡ç»çå
¥åº"); |
| | | Dt_EmptyPallet dt_EmptyPallet = Dt_EmptyPalletRepository.Instance.Find(x => x.EmptyPallet_name == rfid).FirstOrDefault(); |
| | | if (dt_EmptyPallet == null) |
| | | throw new Exception($"æçç :ã{rfid}ã,卿ç管çä¸ï¼æ 该æçï¼è¯·å
æ·»å æçä¿¡æ¯"); |
| | | |
| | | |
| | | |
| | | |
| | | //å¤æè½´æ¿ææææ¯å¦è¶
è¿2å¹´ |
| | |
| | | newBoxDetail.boxdtl_materielid = materielId; |
| | | newBoxDetail.boxdtl_qty = "1"; |
| | | newBoxDetail.boxdtl_operator = UserContext.Current.UserTrueName; |
| | | newBoxDetail.boxdtl_inboundUnit = "æºç²¤"; |
| | | newBoxDetail.boxdtl_inboundUnit = "å京å¨è½¦æ®µ"; |
| | | newBoxDetail.boxdtl_standard = NewOrOld; |
| | | newBoxDetail.boxdtl_carType = materielId; |
| | | newBoxDetail.boxdtl_type = materielType; |
| | |
| | | |
| | | Dt_mes_goods_info info = new Dt_mes_goods_info(); |
| | | info.mesInfo_id = Guid.NewGuid(); |
| | | info.mesInfo_inUnit = "æºç²¤"; |
| | | info.mesInfo_inUnit = "å京å¨è½¦æ®µ"; |
| | | info.mesInfo_madeUnit = madeUnit; |
| | | info.mesInfo_carType = materielId; |
| | | info.mesInfo_type = materielType; |
| | |
| | | info.mesInfo_createType = "mes"; |
| | | info.mesInfo_qrCode = qrCode; |
| | | info.mesInfo_createDate = DateTime.Now; |
| | | info.mesInfo_bak_3 = Standard_value; // ä»¥åæ åå¼ä»è¿éè·å èä½¼æ°å¢ |
| | | info.mesInfo_bak_4 = Placeoforigin; // è½´æ¿çäº§å° |
| | | |
| | | Dt_mes_goods_infoRepository.Instance.Add(info, true); |
| | | |
| | | |
| | | |
| | | |
| | | //è·åç©ºè´§ä½ |
| | | Dt_locationinfo emptyLocation = CommonFunction.GetEmptyLocationAction(); |
| | | Dt_locationinfo emptyLocation = CommonFunction.GetEmptyLocationAction(1); |
| | | |
| | | VV_ContainerInfo_EmptyPallet SelectLocation = VV_ContainerInfo_EmptyPalletRepository.Instance.FindFirst(x => x.location_id == emptyLocation.location_id); |
| | | VV_ContainerInfo conInfohw = VV_ContainerInfoRepository.Instance.FindFirst(x => x.location_id == emptyLocation.location_id); |
| | | if (SelectLocation != null || conInfohw != null) |
| | | { |
| | | LogRecord.WriteLog((int)LogEnum.InBound, $"åé
çè´§ä½å·²æè´§,è´§ä½å·{emptyLocation.location_id}"); |
| | | throw new Exception($"åé
çè´§ä½å·²æè´§,è´§ä½å·{SelectLocation.location_id}"); |
| | | } |
| | | |
| | | //è·åä»»å¡ |
| | | Dt_taskinfo tmpTaskInfo = CommonFunction.AddWMSTask_BoxPalletIn(emptyLocation, rfid, materielId, qrCode, materielType); |
| | | //ä¿®æ¹è´§ä½ç¶æ |