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