注塑挤出批号设置
This commit is contained in:
@@ -2046,7 +2046,7 @@ namespace Tnb.ProductionMgr
|
||||
bool changeBatchFlag = false;
|
||||
int changeCountNumByDay = 0;
|
||||
int changeCountNumByQty = 0;
|
||||
if (mo.mo_type == DictConst.PrdMoTypeZS || mo.mo_type == DictConst.PrdMoTypeJC)
|
||||
if (prdMoTask.is_hand_set_batch==0 && (mo.mo_type == DictConst.PrdMoTypeZS || mo.mo_type == DictConst.PrdMoTypeJC))
|
||||
{
|
||||
BasFactoryConfig changeBatchNum = await _db.Queryable<BasFactoryConfig>().FirstAsync(x => x.enabled == 1 && x.key == FactoryConfigConst.CHANGEBATCHNUM);
|
||||
BasFactoryConfig changeBatchDay = await _db.Queryable<BasFactoryConfig>().FirstAsync(x => x.enabled == 1 && x.key == FactoryConfigConst.CHANGEBATCHDAY);
|
||||
@@ -2071,7 +2071,7 @@ namespace Tnb.ProductionMgr
|
||||
|
||||
}
|
||||
|
||||
if (mo.mo_type == DictConst.PrdMoTypeZS)
|
||||
if (mo.mo_type == DictConst.PrdMoTypeZS && prdMoTask.is_hand_set_batch==0)
|
||||
{
|
||||
if (changeBatchFlag)
|
||||
{
|
||||
@@ -2090,7 +2090,7 @@ namespace Tnb.ProductionMgr
|
||||
}
|
||||
|
||||
|
||||
}else if (mo.mo_type == DictConst.PrdMoTypeJC)
|
||||
}else if (mo.mo_type == DictConst.PrdMoTypeJC && prdMoTask.is_hand_set_batch==0)
|
||||
{
|
||||
ToolMolds toolMolds = await _db.Queryable<ToolMolds>().SingleAsync(x => x.id == prdMoTask.mold_id);
|
||||
batch = $"6{toolMolds.mold_code.Substring(toolMolds.mold_code.Length - 4, 2)}{DateTime.Now.ToString("yyMMdd")}";
|
||||
@@ -4130,12 +4130,13 @@ namespace Tnb.ProductionMgr
|
||||
string batch = input.GetOrDefault("batch");
|
||||
int row = await _db.Updateable<PrdMoTask>()
|
||||
.SetColumns(x => x.batch == batch)
|
||||
.SetColumns(x => x.is_hand_set_batch == 1)
|
||||
.Where(x => idList.Contains(x.id))
|
||||
.ExecuteCommandAsync();
|
||||
foreach (var id in idList)
|
||||
{
|
||||
PrdMoTask prdMoTask = await _db.Queryable<PrdMoTask>().Where(x => x.id == id).SingleAsync();
|
||||
if (prdMoTask.mo_task_status == DictConst.InProgressEnCode)
|
||||
if (prdMoTask.mo_task_status == DictConst.InProgressEnCode && prdMoTask.schedule_type==2)
|
||||
{
|
||||
BasMaterial basMaterial = await _db.Queryable<BasMaterial>().Where(x=>x.id==prdMoTask.material_id).SingleAsync();
|
||||
string code1 = $"(01){basMaterial.di ?? ""}*(11){prdMoTask.act_start_date.Value.ToString("yyMMdd")}*(17){prdMoTask.first_start_date.Value.AddMonths(basMaterial.quality_guarantee_period ?? 0).ToString("yyMMdd")}*(10){batch}";
|
||||
|
||||
Reference in New Issue
Block a user