|
|
@@ -1728,27 +1728,24 @@ namespace Business.ResourceExamineManagement
|
|
|
var mes_mooccupy = _mysql_mes_mooccupy.GetListAsync(x => x.company_id == companyId && x.factory_id == factoryId).Result;
|
|
|
if (mes_mooccupy.Count > 0)
|
|
|
{
|
|
|
- mes_mooccupy.ForEach(item => { item.bang_id = bangid; });
|
|
|
var moMes_mooccupy = ObjectMapper.Map<List<mes_mooccupy>, List<mo_mes_mooccupy>>(mes_mooccupy);
|
|
|
- moMes_mooccupy.ForEach(item => { item.GenerateNewId(help.NextId()); });
|
|
|
+ moMes_mooccupy.ForEach(item => { item.GenerateNewId(help.NextId()); item.bang_id = bangid; });
|
|
|
await _mes_mooccupy.InsertManyAsync(moMes_mooccupy);
|
|
|
}
|
|
|
//工单主表
|
|
|
var mes_morder = _mysql_mes_morder.GetListAsync(x => x.company_id == companyId && x.factory_id == factoryId).Result;
|
|
|
if (mes_morder.Count > 0)
|
|
|
{
|
|
|
- mes_morder.ForEach(item => { item.bang_id = bangid; });
|
|
|
var moMes_morder = ObjectMapper.Map<List<mes_morder>, List<mo_mes_morder>>(mes_morder);
|
|
|
- moMes_morder.ForEach(item => { item.GenerateNewId(help.NextId()); });
|
|
|
+ moMes_morder.ForEach(item => { item.GenerateNewId(help.NextId()); item.bang_id = bangid; });
|
|
|
await _mes_morder.InsertManyAsync(moMes_morder);
|
|
|
}
|
|
|
//工单子表
|
|
|
var mes_moentry = _mysql_mes_moentry.GetListAsync(x => x.company_id == companyId && x.factory_id == factoryId).Result;
|
|
|
if (mes_moentry.Count > 0)
|
|
|
{
|
|
|
- mes_moentry.ForEach(item => { item.bang_id = bangid; });
|
|
|
var moMes_moentry = ObjectMapper.Map<List<mes_moentry>, List<mo_mes_moentry>>(mes_moentry);
|
|
|
- moMes_moentry.ForEach(item => { item.GenerateNewId(help.NextId()); });
|
|
|
+ moMes_moentry.ForEach(item => { item.GenerateNewId(help.NextId()); item.bang_id = bangid; });
|
|
|
await _mes_moentry.InsertManyAsync(moMes_moentry);
|
|
|
}
|
|
|
|
|
|
@@ -1757,9 +1754,8 @@ namespace Business.ResourceExamineManagement
|
|
|
var srm_po_main = _mysql_srm_po_main.GetListAsync(x => x.company_id == companyId && x.factory_id == factoryId).Result;
|
|
|
if (srm_po_main.Count > 0)
|
|
|
{
|
|
|
- srm_po_main.ForEach(item => { item.bang_id = bangid; });
|
|
|
var moSrm_po_main = ObjectMapper.Map<List<srm_po_main>, List<mo_srm_po_main>>(srm_po_main);
|
|
|
- moSrm_po_main.ForEach(item => { item.GenerateNewId(help.NextId()); });
|
|
|
+ moSrm_po_main.ForEach(item => { item.GenerateNewId(help.NextId()); item.bang_id = bangid; });
|
|
|
await _srm_po_main.InsertManyAsync(moSrm_po_main);
|
|
|
}
|
|
|
|
|
|
@@ -1767,9 +1763,8 @@ namespace Business.ResourceExamineManagement
|
|
|
var srm_po_list = _mysql_srm_po_list.GetListAsync(x => x.company_id == companyId && x.factory_id == factoryId).Result;
|
|
|
if (srm_po_list.Count > 0)
|
|
|
{
|
|
|
- srm_po_list.ForEach(item => { item.bang_id = bangid; });
|
|
|
var moSrm_po_list = ObjectMapper.Map<List<srm_po_list>, List<mo_srm_po_list>>(srm_po_list);
|
|
|
- moSrm_po_list.ForEach(item => { item.GenerateNewId(help.NextId()); });
|
|
|
+ moSrm_po_list.ForEach(item => { item.GenerateNewId(help.NextId()); item.bang_id = bangid; });
|
|
|
await _srm_po_list.InsertManyAsync(moSrm_po_list);
|
|
|
}
|
|
|
|
|
|
@@ -1777,9 +1772,8 @@ namespace Business.ResourceExamineManagement
|
|
|
var srm_po_occupy = _mysql_srm_po_occupy.GetListAsync(x => x.company_id == companyId && x.factory_id == factoryId).Result;
|
|
|
if (srm_po_occupy.Count > 0)
|
|
|
{
|
|
|
- srm_po_occupy.ForEach(item => { item.bang_id = bangid; });
|
|
|
var moSrm_po_occupy = ObjectMapper.Map<List<srm_po_occupy>, List<mo_srm_po_occupy>>(srm_po_occupy);
|
|
|
- moSrm_po_occupy.ForEach(item => { item.GenerateNewId(help.NextId()); });
|
|
|
+ moSrm_po_occupy.ForEach(item => { item.GenerateNewId(help.NextId()); item.bang_id = bangid; });
|
|
|
await _srm_po_occupy.InsertManyAsync(moSrm_po_occupy);
|
|
|
}
|
|
|
}
|