bug
This commit is contained in:
@@ -9,6 +9,7 @@ using JNPF.FriendlyException;
|
||||
using JNPF.Systems.Interfaces.System;
|
||||
using JNPF.VisualDev;
|
||||
using JNPF.VisualDev.Entitys.Dto.VisualDevModelData;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using SqlSugar;
|
||||
using Tnb.BasicData.Entities;
|
||||
@@ -87,6 +88,7 @@ namespace Tnb.BasicData
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
public async Task<dynamic> GetInfo(string id)
|
||||
{
|
||||
ISqlSugarClient db = _repository.AsSugarClient();
|
||||
@@ -120,8 +122,8 @@ namespace Tnb.BasicData
|
||||
station = process.station,
|
||||
byproduct_status = process.byproduct_status,
|
||||
production_method = process.production_method,
|
||||
inputs = inputs.Where(x => x.process_id == process.process_id).ToList(),
|
||||
outputs = outputs.Where(x => x.process_id == process.process_id).ToList(),
|
||||
inputs = inputs.Where(x => x.mbom_process_id == process.id).ToList(),
|
||||
outputs = outputs.Where(x => x.mbom_process_id == process.id).ToList(),
|
||||
no = process.no,
|
||||
last_process_no = process.last_process_no,
|
||||
next_process_no = process.next_process_no
|
||||
@@ -570,6 +572,7 @@ namespace Tnb.BasicData
|
||||
/// <param name="mbomSaveDataInput"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
[AllowAnonymous]
|
||||
public async Task<string> SaveDataNew(MbomSaveDataInput mbomSaveDataInput)
|
||||
{
|
||||
ErrorCode errorCode = ErrorCode.COM1008;
|
||||
|
||||
@@ -96,7 +96,7 @@ namespace Tnb.ProductionMgr
|
||||
// })
|
||||
// }).FirstAsync();
|
||||
|
||||
OrganizeEntity workline = await _organizeService.GetAnyParentByWorkstationId(station_id, DictConst.RegionCategoryWorklineCode);
|
||||
//OrganizeEntity workline = await _organizeService.GetAnyParentByWorkstationId(station_id, DictConst.RegionCategoryWorklineCode);
|
||||
// PrdMoTask prdMoTask = await db.Queryable<PrdMoTask>().Where(x => x.workline_id == workline.Id && x.worker_id == _userManager.UserId && x.mo_task_status==DictConst.InProgressEnCode)
|
||||
// .FirstAsync();
|
||||
|
||||
@@ -115,6 +115,8 @@ namespace Tnb.ProductionMgr
|
||||
string nightBeforeEtime = dayNightWorkTime["夜班前"].Split("-")[1];
|
||||
string nightAfterStime = dayNightWorkTime["夜班后"].Split("-")[0];
|
||||
string nightAfterEtime = dayNightWorkTime["夜班后"].Split("-")[1];
|
||||
OrganizeEntity workline = await _organizeService.GetAnyParentByWorkstationId(_userManager.User.OrganizeId,DictConst.RegionCategoryWorklineCode);
|
||||
string userWorklineId = workline?.Id ?? "";
|
||||
|
||||
bool twoDayFlag = string.Compare(nowTime, dayStime) >= 0 && string.Compare(nowTime, dayEtime) <= 0;
|
||||
bool twoNightFlag = string.Compare(nowTime,nightStime)>=0 && string.Compare(nowTime,nightEtime)<=0;
|
||||
@@ -125,8 +127,10 @@ namespace Tnb.ProductionMgr
|
||||
|
||||
string userId = _userManager.UserId;
|
||||
PrdMoTask prdMoTask = await db.Queryable<PrdMoTask>().
|
||||
Where(x => x.workline_id == workline.Id && x.mo_task_status==DictConst.InProgressEnCode)
|
||||
.Where(x=>(x.scheduling_class_type=="1" && twoDayFlag && x.dayshift_worker_id==userId)
|
||||
LeftJoin<PrdMo>((x,y)=>x.mo_id==y.id)
|
||||
.Where(x => x.mo_task_status==DictConst.InProgressEnCode)
|
||||
.Where((x,y)=>(x.scheduling_class_type=="1" && twoDayFlag && x.dayshift_worker_id==userId)
|
||||
|| (y.mo_type==DictConst.PrdMoTypeBZ && !SqlFunc.IsNullOrEmpty(userWorklineId) && x.workline_id==userWorklineId)
|
||||
|| (x.scheduling_class_type=="1" && twoNightFlag && x.nightshift_worker_id==userId)
|
||||
|| (x.scheduling_class_type=="2" && fourDayBeforeFlag && x.dayshift_worker_id==userId)
|
||||
|| (x.scheduling_class_type=="2" && fourDayAfterFlag && x.dayshiftafter_worker_id==userId)
|
||||
|
||||
@@ -907,6 +907,7 @@ namespace Tnb.ProductionMgr
|
||||
moTask.estimated_end_date = input.estimated_end_date;
|
||||
moTask.scheduled_qty = input.scheduled_qty;
|
||||
PrdMo? mo = await _db.Queryable<PrdMo>().FirstAsync(it => it.id == input.mo_id);
|
||||
moTask.unit_id = mo.unit_id;
|
||||
if (mo.mo_status == DictConst.MoCloseId || mo.mo_status == DictConst.MoCompleteId)
|
||||
throw Oops.Bah("状态错误");
|
||||
// moTask.unit_id = mo.unit_id;
|
||||
@@ -1062,7 +1063,8 @@ namespace Tnb.ProductionMgr
|
||||
workstation_id = resultList?.FirstOrDefault() ?? "",
|
||||
mo_task_status = DictConst.ToBeScheduledEncode,
|
||||
workroute_id = item.route_id,
|
||||
unit_id = item.unit_id,
|
||||
// unit_id = item.unit_id,
|
||||
unit_id = mo.unit_id,
|
||||
workline_id = input.workline_id
|
||||
};
|
||||
subMoTask.material_id = item.material_id;
|
||||
|
||||
@@ -86,7 +86,7 @@ namespace Tnb.WarehouseMgr
|
||||
inDeptid = WmsWareHouseConst.sichangqucangku_id;
|
||||
inDeptvid = WmsWareHouseConst.sichangqucangku_vid;
|
||||
tranTypeid = "1001A110000000077KMR";
|
||||
tranTypecode = "4K-Cxx-06";
|
||||
tranTypecode = "4K-Cxx-17";
|
||||
}
|
||||
// 生产入库(成品) 仓库传 1001A1100000001MA8ME
|
||||
else if (endLocation.wh_id == WmsWareHouseConst.WAREHOUSE_CP_ID)
|
||||
@@ -98,7 +98,7 @@ namespace Tnb.WarehouseMgr
|
||||
inDeptid = WmsWareHouseConst.sichangqucangku_id;
|
||||
inDeptvid = WmsWareHouseConst.sichangqucangku_vid;
|
||||
tranTypeid = "1001A11000000006YKHG";
|
||||
tranTypecode = "4K-Cxx-01";
|
||||
tranTypecode = "4K-Cxx-18";
|
||||
|
||||
bool isOk = await _db.Updateable<WmsSterilizationInstockH>().SetColumns(it => new WmsSterilizationInstockH { status = WmsWareHouseConst.BILLSTATUS_COMPLETE_ID })
|
||||
.Where(it => it.id == input.requireId).ExecuteCommandHasChangeAsync();
|
||||
|
||||
Reference in New Issue
Block a user