| | |
| | | private bool UpdateData(SqlSugarScope db, Womcaa womcaaWW, |
| | | List<Womcab> mesRohInDatas) |
| | | { |
| | | |
| | | womcaaWW.Caa001 = mesRohInDatas[0].Cab001; |
| | | womcaaWW.Erpid = womcaaWW.FSUBENTRYID.ToInt32(); |
| | | womcaaWW.Erpid = womcaaWW.Fsubentryid; |
| | | var decimals = mesRohInDatas.Select(s => s.Id).ToArray(); |
| | | var update = base.DeleteById(womcaaWW.Id); |
| | | var insertOrUpdate = db |
| | |
| | | if (mesWomcabss.Count > 0) |
| | | { |
| | | mesWomcaa.Caa001 = mesWomcabss[0].Cab001; |
| | | mesWomcaa.Erpid = mesWomcaa.FSUBENTRYID.ToInt32(); |
| | | mesWomcaa.Erpid = mesWomcaa.Fsubentryid; |
| | | db.Deleteable<Womcab>() |
| | | .Where(s => s.Eid == mesWomcaa.Erpid).ExecuteCommand(); |
| | | .Where(s => s.Eid == mesWomcaa.Erpid).ExecuteCommand(); |
| | | } |
| | | |
| | | |
| | | |
| | | var orUpdate = db.Insertable(mesWomcaa) |
| | | .IgnoreColumns(true).ExecuteCommand() > 0; |
| | |
| | | Caa011 = erpDto.FPlanFinishDate, |
| | | //ParseDateTime(erpDto.FPlanFinishDate) ?? null, |
| | | |
| | | PLANCONFIRMATION = erpDto.PlanConfirmation, |
| | | // PLANCONFIRMATION = erpDto.PlanConfirmation, |
| | | StockInlimith = |
| | | erpDto |
| | | .FStockInLimitH, //Convert.ToDecimal(erpDto.FStockInLimitH), |
| | |
| | | Caa013 = erpDto.FBomId, |
| | | //SalesOrderNo = erpDto.F_UNW_XSDDH, |
| | | CreateType = erpDto.FCreateType, |
| | | FSUBID = erpDto.FSUBID, |
| | | FSUBBILLNOSEQ = erpDto.FSUBBILLNOSEQ, |
| | | FSUBBILLNO = erpDto.FSUBBILLNO, |
| | | Caa020 = erpDto.FSUBBILLNO, |
| | | Fsubid = erpDto.FSUBID, |
| | | Fsubbillnoseq = erpDto.FSUBBILLNOSEQ, |
| | | Fsubbillno = erpDto.FSUBBILLNO, |
| | | Caa020 = erpDto.FSUBBILLNO, |
| | | SrcBillType = erpDto.FSrcBillType, |
| | | SrcBillNo = erpDto.FSrcBillNo, |
| | | SrcBillentryseq = erpDto.FSrcBillEntrySeq, |
| | | FREQSRC = erpDto.FReqSrc, |
| | | Freqsrc = erpDto.FReqSrc, |
| | | SaleOrderNo = erpDto.FSALEORDERNO, |
| | | SaleOrderEntryseq = erpDto.FSaleOrderEntrySeq, |
| | | ForceCloserid = erpDto.FFORCECLOSERID, |
| | | CloseType = erpDto.FCloseType, |
| | | SrcSplitBillno = erpDto.FDescription, |
| | | SRCSPLITSEQ = erpDto.SrcSplitSeq, |
| | | Srcsplitseq = erpDto.FSrcSplitSeq, |
| | | Erpid = Convert.ToDecimal(erpDto.FID), |
| | | FSUBENTRYID = erpDto.FSUBENTRYID, |
| | | FPURORDERNO = erpDto.FPurOrderNo, |
| | | FPURORDERENTRYSEQ = |
| | | erpDto |
| | | .FPurOrderEntrySeq, //Convert.ToInt32(erpDto.FPurOrderEntrySeq), |
| | | FBASESTOCKINQTY = Convert.ToDecimal(erpDto.FBaseStockInQty), |
| | | FBASENOSTOCKINQTY = Convert.ToDecimal(erpDto.FBaseNoStockInQty), |
| | | FINSTOCKOWNERID = erpDto.FInStockOwnerId, |
| | | //PlanConfirmation = erpDto.PlanConfirmation != null |
| | | // ? DateTime.ParseExact(erpDto.PlanConfirmation, |
| | | // "yyyy-MM-dd HH:mm:ss", null) |
| | | // : null, |
| | | Typea = erpDto.TypeA |
| | | Fsubentryid = Decimal.Parse(erpDto.FSUBENTRYID), |
| | | Fpurorderno = erpDto.FPurOrderNo, |
| | | Fpurorderentryseq = |
| | | Decimal.Parse(erpDto |
| | | .FPurOrderEntrySeq), //Convert.ToInt32(erpDto.FPurOrderEntrySeq), |
| | | Fbasestockinqty = Convert.ToDecimal(erpDto.FBaseStockInQty), |
| | | Fbasenostockinqty = Convert.ToDecimal(erpDto.FBaseNoStockInQty), |
| | | Finstockownerid = erpDto.FInStockOwnerId, |
| | | Typea = erpDto.TypeA, |
| | | FXifgKhxsdh = erpDto.F_XIFG_KHXSDH, |
| | | FXifgKhdd = erpDto.F_XIFG_KHDD, |
| | | FXifgNbddh = erpDto.F_XIFG_NBDDH |
| | | }; |
| | | |
| | | var single = base.GetSingle(it => it.Erpid == Convert.ToDecimal(entity.FSUBENTRYID)); |
| | | var single = base.GetSingle(it => |
| | | it.Erpid == Convert.ToDecimal(entity.Fsubentryid)); |
| | | if (single != null) entity.Id = single.Id; |
| | | |
| | | return entity; |
| | |
| | | DepotCode = erpDto.FStockID, |
| | | IssueType = erpDto.FIssueType, |
| | | //Unit = erpDto.FUnitID2, |
| | | Funitid2 = erpDto.FUnitID2, |
| | | SupplyType = erpDto.FSupplyType, |
| | | |
| | | |
| | |
| | | Denominator = Convert.ToDecimal(erpDto.FDenominator), |
| | | Erpid = Convert.ToDecimal(erpDto.FPPOMENTRYID), |
| | | Eid = Convert.ToDecimal(erpDto.FSUBENTRYID), |
| | | SCRAPQTY = Convert.ToDecimal(erpDto.FFixScrapQty), |
| | | SCRAPRATE = Convert.ToDecimal(erpDto.FScrapRate), |
| | | Scrapqty = Convert.ToDecimal(erpDto.FFixScrapQty), |
| | | Scraprate = Convert.ToDecimal(erpDto.FScrapRate), |
| | | MaterialType = erpDto.FMaterialType, |
| | | //Unit2 = erpDto.FUnitID3, |
| | | Freplacegroup = Convert.ToInt32(erpDto.FReplaceGroup), |
| | | //OwnerType = erpDto.FOwnerTypeId, |
| | | //Owner = erpDto.FOwnerID2, |
| | | |
| | | Owner = erpDto.FOwnerID2, |
| | | Fisgetscrap = erpDto.FISGETSCRAP, |
| | | Fiskeycomponent = erpDto.FISKEYCOMPONENT, |
| | | Fsrctransorgid = erpDto.FSRCTRANSORGID, |
| | |
| | | Fmemo = erpDto.FMEMO, |
| | | Typeb = erpDto.TypeB, |
| | | ErpProductionEntryCode = erpDto.FPPOMID, |
| | | FOWNERTYPEID = erpDto.FOwnerTypeId, |
| | | FUNITID2 = erpDto.FUnitID2, |
| | | FUNITID3 = erpDto.FUnitID3 |
| | | Fownertypeid = erpDto.FOwnerTypeId, |
| | | Funitid3 = erpDto.FUnitID3, |
| | | FXifgKhxsdh = erpDto.F_XIFG_KHXSDH, |
| | | FXifgKhdd = erpDto.F_XIFG_KHDD, |
| | | FXifgNbddh = erpDto.F_XIFG_NBDDH |
| | | }; |
| | | |
| | | var single = Db.Queryable<Womcab>().Where(it => it.Erpid == productionOrderSub.Erpid).Single(); |
| | | var single = Db.Queryable<Womcab>() |
| | | .Where(it => it.Erpid == productionOrderSub.Erpid).Single(); |
| | | if (single != null) productionOrderSub.Id = single.Id; |
| | | |
| | | productionOrderSubList.Add(productionOrderSub); |