| | |
| | | return Orders; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 设置收货单明细赠品数量 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public async Task<ApiAction> SetGiftQty(BaseInput input) |
| | | /// <summary> |
| | | /// 生成收货单:调用U9新增收货单接口 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public async Task<ApiAction> SetGiftQty(BaseInput input) |
| | | { |
| | | var action = new ApiAction(); |
| | | try |
| | |
| | | ASN_NO =asnDtl.ORDER_NO, |
| | | ASN_LINE_ID = item.SrcASNDocLineId.ToString(), |
| | | ASN_LINE = asnDtl.LINE_NO, |
| | | ERP_CODE = item.ItemCode1, |
| | | }; |
| | | receipt.Details.Add(receiptDt); |
| | | } |
| | | |
| | | foreach (var item in order.SnList) |
| | | foreach (var sn in order.SnList) |
| | | { |
| | | var dtl = receipt.Details.First(q => q.ASN_LINE == item.LINE_NO); |
| | | var dtl = receipt.Details.First(q => q.ASN_LINE == sn.LINE_NO); |
| | | BIZ_U9_RECEIPT_SN receiptSn = new() |
| | | { |
| | | |
| | | { |
| | | AUTH_ORG = dtl.AUTH_ORG, |
| | | ORDER_NO = dtl.ORDER_NO, |
| | | LINE_NO = dtl.LINE_NO, |
| | | SN = receipt.Details.First().ORDER_NO, |
| | | //META_SN |
| | | ITEM_CODE = dtl.ITEM_CODE, |
| | | STATUS = BIZ_U9_RECEIPT.STATUSs.Imported.GetValue(), |
| | | // QTY |
| | | //UNIT |
| | | //IS_OK |
| | | // IS_IN |
| | | //IS_SCRAP |
| | | //LOTNO |
| | | //CARTON_NO |
| | | //PALLET_NO |
| | | AUTH_ORG = dtl.AUTH_ORG, |
| | | // REMARK = result.Data[item].Code, |
| | | SN = sn.SN, |
| | | META_SN = sn.META_SN, |
| | | ITEM_CODE = sn.ITEM_CODE, |
| | | STATUS = WMS_ITEM.STATUSs.WaitIn.GetValue(), |
| | | QTY = sn.QTY, |
| | | UNIT = sn.UNIT, |
| | | IS_OK = sn.IS_OK, |
| | | IS_IN = sn.IS_IN, |
| | | LOTNO = sn.LOTNO, |
| | | CARTON_NO = sn.CARTON_NO, |
| | | PALLET_NO = sn.PALLET_NO, |
| | | }; |
| | | receipt.SnList.Add(receiptSn); |
| | | } |
| | | |
| | | } |
| | | // throw new NotImplementedException(); |
| | | |
| | | //更新库存表信息 |
| | | var items = MainDB.Queryable<WMS_ITEM>().Where(q => SqlFunc.Subqueryable<BIZ_U9_ASN_SN>().Where(s => s.SN == q.SN && s.ORDER_NO == order.ORDER_NO).Any()).ToList(); |