Merge branch 'dev' of https://git.tuotong-tech.com/tnb/tnb.server into dev
This commit is contained in:
@@ -67,14 +67,15 @@ namespace Tnb.ProductionMgr.Entities.Dto.PrdManage
|
||||
/// </summary>
|
||||
public int? plan_qty { get; set; }
|
||||
public int? scheduled_qty { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 预计开工时间
|
||||
/// </summary>
|
||||
public DateTime? estimated_start_date { get; set; }
|
||||
public string estimated_start_date { get; set; } = string.Empty;
|
||||
/// <summary>
|
||||
/// 预计完工时间
|
||||
/// </summary>
|
||||
public DateTime? estimated_end_date { get; set; }
|
||||
public string estimated_end_date { get; set; }= string.Empty;
|
||||
/// <summary>
|
||||
/// 工序编码
|
||||
/// </summary>
|
||||
|
||||
@@ -301,8 +301,8 @@ namespace Tnb.ProductionMgr
|
||||
eqp_name = e.name,
|
||||
eqp_type_code = SqlFunc.Subqueryable<EqpEquipType>().Where(it => it.id == e.equip_type_id).Select(it => it.code),
|
||||
mo_task_qty = SqlFunc.Subqueryable<PrdMoTask>().Where(a => a.mo_id == moId).Count(),
|
||||
estimated_start_date = a.estimated_start_date,
|
||||
estimated_end_date = a.estimated_end_date,
|
||||
estimated_start_date = a.estimated_start_date.Value.ToString("yyyy-MM-dd HH"),
|
||||
estimated_end_date = a.estimated_end_date.Value.ToString("yyyy-MM-dd HH"),
|
||||
plan_qty = a.scheduled_qty,
|
||||
complete_qty = a.complete_qty,
|
||||
process_code = SqlFunc.Subqueryable<BasProcess>().Where(it => it.id == a.process_id).Select(it => it.process_code),
|
||||
@@ -329,9 +329,9 @@ namespace Tnb.ProductionMgr
|
||||
material_code = c.code,
|
||||
material_name = c.name,
|
||||
mo_task_qty = SqlFunc.Subqueryable<PrdMoTask>().Where(a => a.mo_id == moId).Count(),
|
||||
estimated_start_date = a.estimated_start_date,
|
||||
estimated_end_date = a.estimated_end_date,
|
||||
plan_qty = b.plan_qty,
|
||||
estimated_start_date = a.estimated_start_date.Value.ToString("yyyy-MM-dd HH"),
|
||||
estimated_end_date = a.estimated_end_date.Value.ToString("yyyy-MM-dd HH"),
|
||||
plan_qty = b.scheduled_qty,
|
||||
complete_qty = a.complete_qty,
|
||||
})
|
||||
.Mapper(it =>
|
||||
|
||||
@@ -52,7 +52,6 @@ namespace Tnb.WarehouseMgr
|
||||
/// </param>
|
||||
/// <returns></returns>
|
||||
/// <exception cref="ArgumentNullException"></exception>
|
||||
[HttpPost]
|
||||
public async Task<dynamic> WmsBind(VisualDevModelDataCrInput input)
|
||||
{
|
||||
var isOk = false;
|
||||
@@ -139,6 +138,12 @@ namespace Tnb.WarehouseMgr
|
||||
carryObj.source_id = null;
|
||||
carryObj.source_code = null;
|
||||
row = await _db.Updateable(carryObj).ExecuteCommandAsync();
|
||||
//删除载具明细
|
||||
await _db.Deleteable<WmsCarryD>().Where(it => it.carry_id == carryObj.id).ExecuteCommandHasChangeAsync();
|
||||
//删除载具分拣物料明细
|
||||
await _db.Deleteable<WmsCarryMat>().Where(it => it.carry_id == carryObj.id).ExecuteCommandHasChangeAsync();
|
||||
//删除载具条码
|
||||
await _db.Deleteable<WmsCarryCode>().Where(it => it.carry_id == carryObj.id).ExecuteCommandHasChangeAsync();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
@@ -51,7 +51,6 @@ namespace Tnb.WarehouseMgr
|
||||
_wareHouseService = wareHouseService;
|
||||
OverideFuncs.CreateAsync = CarryUnbind;
|
||||
}
|
||||
[HttpPost]
|
||||
private async Task<dynamic> CarryUnbind(VisualDevModelDataCrInput input)
|
||||
{
|
||||
var isOk = false;
|
||||
|
||||
@@ -157,9 +157,8 @@ namespace Tnb.WarehouseMgr
|
||||
await _db.Insertable(wmsEmptyOutstockD)
|
||||
.ExecuteCommandAsync();
|
||||
|
||||
//根据载具移出Id,回更单据状态
|
||||
//根据空载具出库Id,回更单据状态
|
||||
await _db.Updateable<WmsEmptyOutstockH>().SetColumns(it => new WmsEmptyOutstockH { status = WmsWareHouseConst.BILLSTATUS_ON_ID }).Where(it => it.id == preTaskUpInput.RquireId).ExecuteCommandAsync();
|
||||
|
||||
await _wareHouseService.GenInStockTaskHandleAfter(preTaskUpInput,
|
||||
it => new WmsCarryH { is_lock = 1, location_id = preTaskUpInput.CarryStartLocationId, location_code = preTaskUpInput.CarryStartLocationCode },
|
||||
it => new BasLocation { is_lock = 1 });
|
||||
|
||||
@@ -140,6 +140,12 @@ namespace Tnb.WarehouseMgr
|
||||
carryObj.source_id = null;
|
||||
carryObj.source_code = null;
|
||||
row = await _db.Updateable(carryObj).ExecuteCommandAsync();
|
||||
//删除载具明细
|
||||
await _db.Deleteable<WmsCarryD>().Where(it => it.carry_id == carryObj.id).ExecuteCommandHasChangeAsync();
|
||||
//删除载具分拣物料明细
|
||||
await _db.Deleteable<WmsCarryMat>().Where(it => it.carry_id == carryObj.id).ExecuteCommandHasChangeAsync();
|
||||
//删除载具条码
|
||||
await _db.Deleteable<WmsCarryCode>().Where(it => it.carry_id == carryObj.id).ExecuteCommandHasChangeAsync();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
@@ -169,7 +169,7 @@ namespace Tnb.WarehouseMgr
|
||||
handleH.create_id = _userManager.UserId;
|
||||
handleH.create_time = DateTime.Now;
|
||||
preTaskUpInput.PreTaskRecord = handleH;
|
||||
//根据载具移出Id,回更单据状态
|
||||
//根据空载具出库Id,回更单据状态
|
||||
await _db.Updateable<WmsEmptyOutstockH>().SetColumns(it => new WmsEmptyOutstockH { status = WmsWareHouseConst.BILLSTATUS_ON_ID }).Where(it => it.id == preTaskUpInput.RquireId).ExecuteCommandAsync();
|
||||
|
||||
await _wareHouseService.GenInStockTaskHandleAfter(preTaskUpInput,
|
||||
|
||||
@@ -43,7 +43,7 @@ namespace Tnb.WarehouseMgr
|
||||
_wmsCarryService = wmsCarryService;
|
||||
OverideFuncs.CreateAsync = WmsPDAFeeding;
|
||||
}
|
||||
[HttpPost]
|
||||
|
||||
private async Task<dynamic> WmsPDAFeeding(VisualDevModelDataCrInput input)
|
||||
{
|
||||
var isOk = false;
|
||||
@@ -131,6 +131,12 @@ namespace Tnb.WarehouseMgr
|
||||
carryObj.source_id = null;
|
||||
carryObj.source_code = null;
|
||||
row = await _db.Updateable(carryObj).ExecuteCommandAsync();
|
||||
//删除载具明细
|
||||
await _db.Deleteable<WmsCarryD>().Where(it => it.carry_id == carryObj.id).ExecuteCommandHasChangeAsync();
|
||||
//删除载具分拣物料明细
|
||||
await _db.Deleteable<WmsCarryMat>().Where(it => it.carry_id == carryObj.id).ExecuteCommandHasChangeAsync();
|
||||
//删除载具条码
|
||||
await _db.Deleteable<WmsCarryCode>().Where(it => it.carry_id == carryObj.id).ExecuteCommandHasChangeAsync();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@@ -171,7 +177,7 @@ namespace Tnb.WarehouseMgr
|
||||
/// </summary>
|
||||
/// <param name="carryId"></param>
|
||||
/// <returns></returns>
|
||||
|
||||
[HttpGet]
|
||||
public async Task<dynamic> GetCarryCodeList([FromRoute] string carryId)
|
||||
{
|
||||
if (dicMaterial.Count < 1)
|
||||
|
||||
Reference in New Issue
Block a user