| | |
| | | } |
| | | } |
| | | |
| | | var cgDetail = db.Queryable<TN_CG_Detail>().First(a => a.S_CNTR_CODE == model.CntId && a.S_CG_ID == model.CgId); |
| | | var cgDetail = db.Queryable<TN_CG_Detail>().First(a => a.S_CNTR_CODE == model.CntId && a.S_ITEM_CODE == model.ItemCode); |
| | | if (cgDetail == null) { |
| | | var locList = new List<TN_CG_Detail>(); |
| | | locList.Add(new TN_CG_Detail { S_CNTR_CODE = model.CntId, S_CG_ID = model.CntId }); |
| | | locList.Add(new TN_CG_Detail { S_CNTR_CODE = model.CntId, S_ITEM_CODE = model.ItemCode }); |
| | | if (db.Insertable<TN_CG_Detail>(locList).ExecuteCommand() <= 0) { |
| | | tran.RollbackTran(); |
| | | return $"插入托盘物料关系{model.CntId}-{model.CgId}失败"; |
| | | return $"插入托盘物料关系{model.CntId}-{model.ItemCode}失败"; |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | public class CgInfo { |
| | | public string CgId { get; set; } |
| | | public string ItemCode { get; set; } |
| | | public string CntId { get; set; } |
| | | public string LocId { get; set; } |
| | | } |