| | |
| | | return q.OrderBy(i => i.InDate).ToList(); |
| | | }; |
| | | |
| | | // 4ï¸â£åé
æ£ä»¶ï¼ä¼å
ç«åº Status=1ï¼ |
| | | // 4ï¸â£åé
æ£ä»¶ï¼ä¼å
ç«åº Status=0ï¼ |
| | | decimal remainingPartial = partialQty; |
| | | if (remainingPartial > 0) |
| | | { |
| | |
| | | decimal orderQty = (decimal)item.order_qty; |
| | | |
| | | // 2ï¸â£ æ¥ç©æåºç¡ä¿¡æ¯ï¼è·åç®±è§ï¼ |
| | | var medication = BaseDal.Db.Queryable<Dt_MedicineGoods>() |
| | | .Where(m => m.Goods_no == item.goods_no) |
| | | var medication = BaseDal.Db.Queryable<Dt_MaterielInfo>() |
| | | .Where(m => m.MaterielCode == item.goods_no) |
| | | .First(); |
| | | //å¦æç©æä¿¡æ¯ä¸åå¨ï¼è·³è¿æ´ä¸ªå
¥åºå |
| | | if (medication == null) |
| | |
| | | string materialCode = "YY";//é»è®¤å¼ |
| | | //è·åå½å订åç第ä¸ä¸ªæç»é¡¹ |
| | | var firstDetail = order.Details.FirstOrDefault(); |
| | | if (firstDetail?.MedicineGoods != null && !string.IsNullOrEmpty(firstDetail.MedicineGoods.MaterialCode)) |
| | | if (firstDetail?.MedicineGoods != null && !string.IsNullOrEmpty(firstDetail.MedicineGoods.MaterielErpType)) |
| | | { |
| | | //妿æ¡ä»¶æ»¡è¶³ï¼å°ç©æä»£ç 设置为第ä¸ä¸ªæç»é¡¹å¯¹åºçè¯åç©æä»£ç |
| | | materialCode = firstDetail.MedicineGoods.MaterialCode; |
| | | materialCode = firstDetail.MedicineGoods.MaterielErpType; |
| | | } |
| | | // 3. ç»è£
DTO |
| | | var ediDto = new TowcsDto.ToediOutInfo |
| | |
| | | { |
| | | batchNo = d.Batch_num, |
| | | productCode = d.Goods_no, |
| | | productName = d.MedicineGoods?.Goods_spm, |
| | | productSpecifications = d.MedicineGoods?.Model, |
| | | productName = d.MedicineGoods?.MaterielName, |
| | | productSpecifications = d.MedicineGoods?.MaterielModel, |
| | | quantity = (int)d.Order_qty, |
| | | //stocktakingDetails = order.Out_type == "3" |
| | | // ? new List<ToOutediInStock> |