bug
This commit is contained in:
@@ -840,14 +840,13 @@ namespace Tnb.ProductionMgr
|
||||
|
||||
foreach (ErpBdMaterial erpBdMaterial in list)
|
||||
{
|
||||
string unitId = erpExtendFields.Find(x => x.cunitid == erpBdMaterial.PK_MEASDOC)?.table_id ?? "";
|
||||
unitId = unitDic.ContainsKey(unitId) ? unitDic[unitId].ToString() : "";
|
||||
string auxiliaryUnitId =
|
||||
erpExtendFields.Find(x => x.cunitid == erpBdMaterial.FMEASDOC)?.table_id ?? "";
|
||||
auxiliaryUnitId = unitDic.ContainsKey(auxiliaryUnitId) ? unitDic[auxiliaryUnitId].ToString() : "";
|
||||
string[] unitArr = erpBdMaterial.MEASRATE.Split("/");
|
||||
if (erpExtendFields.All(x => x.cmaterialoid != erpBdMaterial.ID))
|
||||
{
|
||||
string unitId = erpExtendFields.Find(x => x.cunitid == erpBdMaterial.PK_MEASDOC)?.table_id ?? "";
|
||||
unitId = unitDic.ContainsKey(unitId) ? unitDic[unitId].ToString() : "";
|
||||
string auxiliaryUnitId = erpExtendFields.Find(x => x.cunitid == erpBdMaterial.FMEASDOC)?.table_id ?? "";
|
||||
auxiliaryUnitId = unitDic.ContainsKey(auxiliaryUnitId) ? unitDic[auxiliaryUnitId].ToString() : "";
|
||||
string[] unitArr = erpBdMaterial.MEASRATE.Split("/");
|
||||
BasMaterial basMaterial = null;
|
||||
ErpExtendField tempExtendField = insertExtendFields.Find(x => x.cmaterialoid == erpBdMaterial.ID);
|
||||
if (tempExtendField!=null)
|
||||
@@ -901,6 +900,12 @@ namespace Tnb.ProductionMgr
|
||||
BasMaterial basMaterial = await _db.Queryable<BasMaterial>().SingleAsync(x => x.id == materialId);
|
||||
if (erpBdMaterial.MODIFIEDTIME != extendField.erp_modify_time)
|
||||
{
|
||||
string unitId = erpExtendFields.Find(x => x.cunitid == erpBdMaterial.PK_MEASDOC)?.table_id ?? "";
|
||||
unitId = unitDic.ContainsKey(unitId) ? unitDic[unitId].ToString() : "";
|
||||
string auxiliaryUnitId = erpExtendFields.Find(x => x.cunitid == erpBdMaterial.FMEASDOC)?.table_id ?? "";
|
||||
auxiliaryUnitId = unitDic.ContainsKey(auxiliaryUnitId) ? unitDic[auxiliaryUnitId].ToString() : "";
|
||||
string[] unitArr = erpBdMaterial.MEASRATE.Split("/");
|
||||
|
||||
int updateRow = await _db.Updateable<BasMaterial>()
|
||||
.SetColumns(x => x.name == erpBdMaterial.NAME)
|
||||
.SetColumns(x => x.code == erpBdMaterial.CODE)
|
||||
@@ -1067,7 +1072,7 @@ namespace Tnb.ProductionMgr
|
||||
await _db.Insertable(insertBasEbomDs).ExecuteCommandAsync();
|
||||
|
||||
await _db.Ado.CommitTranAsync();
|
||||
msg = $"新增物料${insertMaterial.Count}条,修改物料{editCount}条";
|
||||
msg = $"新增物料{insertMaterial.Count}条,修改物料{editCount}条";
|
||||
Log.Information(msg);
|
||||
}
|
||||
catch (Exception e)
|
||||
@@ -1171,7 +1176,7 @@ namespace Tnb.ProductionMgr
|
||||
{
|
||||
table_id = basCustomer.id,
|
||||
table_name = "bas_customer",
|
||||
cunitid = erpBdCustomer.ID,
|
||||
customer_id = erpBdCustomer.ID,
|
||||
create_time = DateTime.Now
|
||||
};
|
||||
|
||||
@@ -1205,7 +1210,7 @@ namespace Tnb.ProductionMgr
|
||||
|
||||
await _db.Ado.CommitTranAsync();
|
||||
|
||||
msg = $"新增客户${insertCustomers.Count}条,修改客户{editCount}条";
|
||||
msg = $"新增客户{insertCustomers.Count}条,修改客户{editCount}条";
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
@@ -1253,7 +1258,7 @@ namespace Tnb.ProductionMgr
|
||||
{
|
||||
table_id = basSupplier.id,
|
||||
table_name = "bas_supplier",
|
||||
cunitid = erpBdSupplier.ID,
|
||||
supplier_id = erpBdSupplier.ID,
|
||||
create_time = DateTime.Now
|
||||
};
|
||||
|
||||
@@ -1287,7 +1292,7 @@ namespace Tnb.ProductionMgr
|
||||
|
||||
await _db.Ado.CommitTranAsync();
|
||||
|
||||
msg = $"新增供应商${insertSuppliers.Count}条,修改供应商{editCount}条";
|
||||
msg = $"新增供应商{insertSuppliers.Count}条,修改供应商{editCount}条";
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
@@ -1371,7 +1376,7 @@ namespace Tnb.ProductionMgr
|
||||
|
||||
await _db.Ado.CommitTranAsync();
|
||||
|
||||
msg = $"新增用户${insertUsers.Count}条";
|
||||
msg = $"新增用户{insertUsers.Count}条";
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user