bug
This commit is contained in:
@@ -2559,7 +2559,7 @@ namespace Tnb.ProductionMgr
|
||||
// thirdWebapiRecord.url = WmsWareHouseConst.BIP_DOMAIN+"uapws/rest/pwrnew/save";
|
||||
thirdWebapiRecord.request_data = JsonConvert.SerializeObject(erpRequestData);
|
||||
thirdWebapiRecord.create_time = DateTime.Now;
|
||||
|
||||
thirdWebapiRecord.remark = $"载具编号:{report?.material_box_code ?? ""}";
|
||||
await _db.Insertable(thirdWebapiRecord).ExecuteCommandAsync();
|
||||
}
|
||||
|
||||
|
||||
@@ -914,7 +914,7 @@ namespace Tnb.ProductionMgr
|
||||
|
||||
try
|
||||
{
|
||||
string response2 = HttpUtils.RequestGet($"{config.value}/api/production/time-work/sync-material");
|
||||
string response2 = HttpUtils.RequestGet($"{config.value}/api/production/time-work/sync-material",null,10*60*1000);
|
||||
AuthResponse authResponse2 = JsonConvert.DeserializeObject<AuthResponse>(response2);
|
||||
result += ","+authResponse2.data.ToString();
|
||||
}
|
||||
@@ -1014,10 +1014,10 @@ namespace Tnb.ProductionMgr
|
||||
if (erpBdMaterial.CODE.StartsWith("0401"))
|
||||
{
|
||||
string str = "";
|
||||
if (erpBdMaterial.MATERIALSPEC.Contains("*"))
|
||||
if (erpBdMaterial.MATERIALSPEC!=null && erpBdMaterial.MATERIALSPEC.Contains("*"))
|
||||
{
|
||||
str = erpBdMaterial.MATERIALSPEC;
|
||||
}else if (erpBdMaterial.NAME.Contains("*"))
|
||||
}else if (erpBdMaterial.NAME!=null && erpBdMaterial.NAME.Contains("*"))
|
||||
{
|
||||
str = erpBdMaterial.NAME;
|
||||
}
|
||||
@@ -1030,7 +1030,7 @@ namespace Tnb.ProductionMgr
|
||||
if (strArr.Length <= 2)
|
||||
{
|
||||
categoryId = "[\"CGJCJ\"]";
|
||||
}else if (decimal.Parse(strArr[2]) > 600)
|
||||
}else if (decimal.Parse(strArr[2]) > 500)
|
||||
{
|
||||
categoryId = "[\"CGJCJ\"]";
|
||||
}
|
||||
@@ -1042,7 +1042,7 @@ namespace Tnb.ProductionMgr
|
||||
}
|
||||
else
|
||||
{
|
||||
categoryId = materialcategoryDic.ContainsKey(erpBdMaterial.DEFNAME) ? $"[\"{materialcategoryDic["erpBdMaterial.DEFNAME"]}\"]" : "[\"CGJCJ\"]";
|
||||
categoryId = !string.IsNullOrEmpty(erpBdMaterial.DEFNAME) && materialcategoryDic.ContainsKey(erpBdMaterial.DEFNAME) ? $"[\"{materialcategoryDic[erpBdMaterial.DEFNAME]}\"]" : "";
|
||||
}
|
||||
|
||||
if (erpExtendFields.All(x => x.cmaterialoid != erpBdMaterial.ID))
|
||||
@@ -1103,6 +1103,7 @@ namespace Tnb.ProductionMgr
|
||||
ErpExtendField extendField = erpExtendFields.Find(x => x.cmaterialoid == erpBdMaterial.ID);
|
||||
string materialId = extendField?.table_id ?? "";
|
||||
BasMaterial basMaterial = await _db.Queryable<BasMaterial>().SingleAsync(x => x.id == materialId);
|
||||
// if (extendField.erp_modify_time==null || erpBdMaterial.MODIFIEDTIME != extendField.erp_modify_time)
|
||||
if (erpBdMaterial.MODIFIEDTIME != extendField.erp_modify_time)
|
||||
{
|
||||
string unitId = erpExtendFields.Find(x => x.cunitid == erpBdMaterial.PK_MEASDOC)?.table_id ?? "";
|
||||
@@ -1114,7 +1115,7 @@ namespace Tnb.ProductionMgr
|
||||
int updateRow = await _db.Updateable<BasMaterial>()
|
||||
.SetColumns(x => x.name == erpBdMaterial.NAME)
|
||||
.SetColumns(x => x.code == erpBdMaterial.CODE)
|
||||
.SetColumns(x=>x.category_id == categoryId)
|
||||
.SetColumnsIF(!string.IsNullOrEmpty(categoryId),x=>x.category_id == categoryId)
|
||||
.SetColumns(x => x.material_specification == erpBdMaterial.MATERIALSPEC)
|
||||
.SetColumns(x => x.material_standard == erpBdMaterial.MATERIALTYPE)
|
||||
.SetColumns(x => x.unit_id == unitId)
|
||||
@@ -1183,7 +1184,7 @@ namespace Tnb.ProductionMgr
|
||||
BasMaterial material = materials.Find(x => x.code==firstItemInList.MPRODID);
|
||||
if (material == null) continue;
|
||||
string unitId = unitDic2.ContainsKey(firstItemInList.UNIT) ? unitDic2[firstItemInList.UNIT].ToString() : "";
|
||||
if (basEbomHs.All(x => x.material_id != material.id && x.version != firstItemInList.HVERSION))
|
||||
if (basEbomHs.FindIndex(x => x.material_id == material.id && x.version == firstItemInList.HVERSION)==-1)
|
||||
{
|
||||
BasEbomH basEbomH = new BasEbomH()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user