Merge branch 'dev' of https://git.tuotong-tech.com/tnb/tnb.server into dev
This commit is contained in:
@@ -41,6 +41,7 @@ using Tnb.Common.Utils;
|
||||
using Tnb.Common.Redis;
|
||||
using Tnb.WarehouseMgr.Entities.Consts;
|
||||
using JNPF.Extras.CollectiveOAuth.Utils;
|
||||
using JNPF.Systems.Interfaces.Permission;
|
||||
using Tnb.WarehouseMgr.Entities;
|
||||
using Tnb.WarehouseMgr.Entities.Dto;
|
||||
using Tnb.WarehouseMgr.Entities.Dto.Inputs;
|
||||
@@ -73,6 +74,7 @@ namespace Tnb.ProductionMgr
|
||||
private readonly IBillRullService _billRuleService;
|
||||
private readonly IPrdInstockService _prdInstockService;
|
||||
private readonly WmsPrdInstockHService _wmsPrdInstockHService;
|
||||
private readonly IOrganizeService _organizeService;
|
||||
private readonly IQcCheckPlanService _qcCheckPlanService;
|
||||
private readonly IWmsCarryService _wmsCarryService;
|
||||
private readonly ElevatorControlConfiguration _eleCtlCfg = App.Configuration.Build<ElevatorControlConfiguration>();
|
||||
@@ -88,6 +90,7 @@ namespace Tnb.ProductionMgr
|
||||
IWmsCarryService wmsCarryService,
|
||||
IBillRullService billRullService,
|
||||
IPrdInstockService prdInstockService,
|
||||
IOrganizeService organizeService,
|
||||
WmsPrdInstockHService wmsPrdInstockHService,
|
||||
IVisualDevService visualDevService,
|
||||
IQcCheckPlanService qcCheckPlanService
|
||||
@@ -98,6 +101,7 @@ namespace Tnb.ProductionMgr
|
||||
_dictionaryDataService = dictionaryDataService;
|
||||
_runService = runService;
|
||||
_visualDevService = visualDevService;
|
||||
_organizeService = organizeService;
|
||||
_db = _repository.AsSugarClient();
|
||||
OverideFuncs.DeleteAsync = Delete;
|
||||
OverideFuncs.GetListAsync = GetList;
|
||||
@@ -2126,87 +2130,43 @@ namespace Tnb.ProductionMgr
|
||||
Dictionary<string, object> erpRequestData = new Dictionary<string, object>();
|
||||
erpRequestData.Add("auditer",erpCreateId);
|
||||
erpRequestData.Add("billmaker",erpCreateId);
|
||||
erpRequestData.Add("cdeptid","");
|
||||
erpRequestData.Add("cdeptvid","");
|
||||
erpRequestData.Add("cdeptid","1001A1100000000JRLI1");//部门先写死
|
||||
erpRequestData.Add("cdeptvid","0001A11000000007GGO8");//部门先写死
|
||||
erpRequestData.Add("taudittime",nowStr);
|
||||
erpRequestData.Add("creationtime",nowStr);
|
||||
erpRequestData.Add("creator",erpCreateId);
|
||||
erpRequestData.Add("cshiftid","");
|
||||
erpRequestData.Add("cteamid","");
|
||||
erpRequestData.Add("cwkid","");
|
||||
erpRequestData.Add("cworkmanid",erpCreateId);
|
||||
erpRequestData.Add("dbilldate",nowStr);
|
||||
erpRequestData.Add("dmakedate",nowStr);
|
||||
erpRequestData.Add("fbillstatus",1);
|
||||
erpRequestData.Add("fprodmode",1);
|
||||
erpRequestData.Add("pk_org",erpOrg.pk_org);
|
||||
erpRequestData.Add("pk_org_v",erpOrg.pk_org_v);
|
||||
erpRequestData.Add("pk_group",erpOrg.pk_group);
|
||||
erpRequestData.Add("pk_wr","");
|
||||
erpRequestData.Add("vbillcode","");
|
||||
erpRequestData.Add("vnote","");
|
||||
erpRequestData.Add("vtrantypecode","55A4-01");
|
||||
erpRequestData.Add("vtrantypeid","0001A11000000002LVX8");
|
||||
erpRequestData.Add("vdef1",null);
|
||||
erpRequestData.Add("vdef2",null);
|
||||
|
||||
|
||||
List<Dictionary<string, object>> erpRequestDataDetails = new List<Dictionary<string, object>>();
|
||||
erpRequestDataDetails.Add(new Dictionary<string, object>()
|
||||
{
|
||||
["bbchkflag"] = false,
|
||||
["bbhasbckfled"] = false,
|
||||
["bbhaspicked"] = false,
|
||||
["bbinstock"] = false,
|
||||
["bbisempass"] = false,
|
||||
["bbotherreject"] = false,
|
||||
["bbsetmark"] = false,
|
||||
["bbstockbycheck"] = false,
|
||||
["cbastunitid"] = "",
|
||||
["cbbomversionid"] = "",
|
||||
["cbdeptid"] = "",
|
||||
["cbdeptvid"] = "",
|
||||
["cbfirstmobid"] = "",
|
||||
["cbfirstmoid"] = "",
|
||||
["cbmainbomid"] = "",
|
||||
["cbdeptid"] = "1001A1100000000JRLI1",//部门先写死
|
||||
["cbdeptvid"] = "0001A11000000007GGO8",//部门先写死
|
||||
["cbmainmaterialid"] = erpExtendFields.Find(x=>x.table_id==report.material_id)?.cmaterialoid ?? "",
|
||||
["cbmainmaterialvid"] = erpExtendFields.Find(x=>x.table_id==report.material_id)?.cmaterialvid ?? "",
|
||||
["cbmaterialid"] = erpExtendFields.Find(x=>x.table_id==report.material_id)?.cmaterialvid ?? "",
|
||||
["cbmaterialvid"] = erpExtendFields.Find(x=>x.table_id==report.material_id)?.cmaterialvid ?? "",
|
||||
["cbmobid"] = prdMo.erp_lineno,
|
||||
["cbmoid"] = prdMo.erp_mo_pk,
|
||||
["cbsrctranstype"] = "",
|
||||
["cbsrctype"] = "",
|
||||
["cbunitid"] = erpExtendFields.Find(x=>x.table_id==report.unit_id)?.cunitid ?? "",
|
||||
["cbworkmanid"] = erpCreateId,
|
||||
["fbproducttype"] = 1,
|
||||
["fbsourcetype"] = 2,
|
||||
// ["nbplanwrastnum"] = "",
|
||||
["cbastunitid"] = "",
|
||||
["nbplanwrnum"] = report.reported_qty,
|
||||
["nbwrnum"] = report.reported_qty,
|
||||
["pk_wr"] = "",
|
||||
["pk_wr_product"] = "",
|
||||
["pseudocolumn"] = 10,
|
||||
["tbendtime"] = "",
|
||||
["tbstarttime"] = "",
|
||||
["vbbatchcode"] = report.batch,
|
||||
["vbbatchid"] = "",
|
||||
["vbchangerate"] = "",
|
||||
["vbfirstcode"] = "",
|
||||
["vbfirstid"] = "",
|
||||
["vbfirstmocode"] = "",
|
||||
["vbfirstmorowno"] = "",
|
||||
["vbfirsttype"] = "",
|
||||
["vbidentify"] = "",
|
||||
["vbinbatchcode"] = report.batch,
|
||||
["vbinbatchid"] = "",
|
||||
["vbmainbomcode"] = "",
|
||||
["vbmainidentify"] = "",
|
||||
["vbmainmorowno"] = "",
|
||||
["vbmobillcode"] = prdMo.mo_code,
|
||||
["vbmorowno"] = prdMo.erp_lineno,
|
||||
["vbrowno"] = prdMo.erp_lineno,
|
||||
["vbsrccode"] = "",
|
||||
["vbsrcid"] = "",
|
||||
["vbsrcrowid"] = "",
|
||||
["vbsrcrowno"] = "",
|
||||
["vbsrctranstype"] = "",
|
||||
["vbdef2"] = 10,
|
||||
|
||||
});
|
||||
erpRequestData.Add("AggWrDtl",erpRequestDataDetails);
|
||||
requestData.Add(erpRequestData);
|
||||
@@ -3384,8 +3344,13 @@ namespace Tnb.ProductionMgr
|
||||
{
|
||||
throw Oops.Bah("工位错误");
|
||||
}
|
||||
|
||||
PrdMoTask? prdMoTask = await _db.Queryable<PrdMoTask>().Where(x => x.workstation_id == station_id && x.parent_id != null && x.mo_task_status == DictConst.InProgressEnCode).FirstAsync();
|
||||
OrganizeEntity workline = await _organizeService.GetAnyParentByWorkstationId(station_id, DictConst.RegionCategoryWorklineCode);
|
||||
if (workline==null)
|
||||
{
|
||||
throw Oops.Bah($"未找到该工位{station_id}的车间");
|
||||
}
|
||||
|
||||
PrdMoTask? prdMoTask = await _db.Queryable<PrdMoTask>().Where(x => x.workline_id==workline.Id && x.parent_id != null && x.mo_task_status == DictConst.InProgressEnCode).FirstAsync();
|
||||
if (prdMoTask != null)
|
||||
{
|
||||
BasMaterial basMaterial = await _db.Queryable<BasMaterial>().SingleAsync(x => x.id == prdMoTask.material_id);
|
||||
@@ -3552,9 +3517,8 @@ namespace Tnb.ProductionMgr
|
||||
//TODO 之后要改
|
||||
Dictionary<String, String> dic = new Dictionary<string, string>()
|
||||
{
|
||||
["WBZ1"] = "30019971917589",//血路管自动生产线1线
|
||||
["WBZ2"] = "123",
|
||||
["WBZ3"] = "123",
|
||||
["WBZ1"] = WmsWareHouseConst.XUELUGUAN1XIAN,//血路管自动生产线1线
|
||||
["WBZ2"] = WmsWareHouseConst.XUELUGUAN2XIAN,
|
||||
};
|
||||
if (dic.TryGetValue(input.result, out string worklineId))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user