|
|
@ -576,9 +576,29 @@ public class CM_State_Change_TemplatImportService : CMServiceBase, ICM_State_Cha
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var reqtype = new CM_BuyCtn_DetailReq();
|
|
|
|
var reqtype = new CM_BuyCtn_DetailReq();
|
|
|
|
var detail = new CM_BuyCtn_Detail();
|
|
|
|
var detail = new CM_BuyCtn_Detail();
|
|
|
|
_r = await 通过模板导入子表明细(reqtype, detail, req);
|
|
|
|
//_r = await 通过模板导入子表明细(reqtype, detail, req);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var _head = tenantDb.Queryable<CM_BuyCtn>().Where(x => x.Id == req.Id).First();
|
|
|
|
|
|
|
|
var head = _head.Adapt<CM_BuyCtnReq>();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_r = await 通过模板生成请求子表明细(reqtype, req);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!_r.Succeeded)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return _r;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (_r.Data != null)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
head.BodyList = _r.Data as List<CM_BuyCtn_DetailReq>;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_CM_BuyCtn.EditCM_BuyCtn(head);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return _r;
|
|
|
|
return _r;
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//卖箱 处理
|
|
|
|
//卖箱 处理
|
|
|
@ -709,9 +729,30 @@ public class CM_State_Change_TemplatImportService : CMServiceBase, ICM_State_Cha
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var reqtype = new CM_RentOneWay_DetailReq();
|
|
|
|
var reqtype = new CM_RentOneWay_DetailReq();
|
|
|
|
var detail = new CM_RentOneWay_Detail();
|
|
|
|
var detail = new CM_RentOneWay_Detail();
|
|
|
|
_r = await 通过模板导入子表明细(reqtype, detail, req);
|
|
|
|
//_r = await 通过模板导入子表明细(reqtype, detail, req);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var _head = tenantDb.Queryable<CM_RentOneWay_In>().Where(x => x.Id == req.Id).First();
|
|
|
|
|
|
|
|
var head = _head.Adapt<CM_RentOneWay_InReq>();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_r = await 通过模板生成请求子表明细(reqtype, req);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!_r.Succeeded)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return _r;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (_r.Data != null)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
head.BodyList = _r.Data as List<CM_RentOneWay_DetailReq>;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_CM_RentOneWay_In.EditCM_RentOneWay_In(head);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return _r;
|
|
|
|
return _r;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//return _r;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//报废处理
|
|
|
|
//报废处理
|
|
|
@ -793,10 +834,15 @@ public class CM_State_Change_TemplatImportService : CMServiceBase, ICM_State_Cha
|
|
|
|
var 状态变动表head = await db.Queryable<SysDictType>().FirstAsync(x => x.Code == "CM_StateChange_Field");
|
|
|
|
var 状态变动表head = await db.Queryable<SysDictType>().FirstAsync(x => x.Code == "CM_StateChange_Field");
|
|
|
|
var 字段列表 = await db.Queryable<SysDictData>().Where(x => x.TypeId == 状态变动表head.Id).ToListAsync();
|
|
|
|
var 字段列表 = await db.Queryable<SysDictData>().Where(x => x.TypeId == 状态变动表head.Id).ToListAsync();
|
|
|
|
|
|
|
|
|
|
|
|
//1834834297505320960
|
|
|
|
|
|
|
|
var excel文件info = tenantDb.Queryable<OpFile>().FirstAsync(x => x.Id == req.FileId).Result;
|
|
|
|
var excel文件info = tenantDb.Queryable<OpFile>().FirstAsync(x => x.Id == req.FileId).Result;
|
|
|
|
|
|
|
|
|
|
|
|
//var filePath = Path.Combine(_environment.WebRootPath, excel文件info.FilePath);
|
|
|
|
//正式地址
|
|
|
|
|
|
|
|
//var pathhead = _environment.WebRootPath.Replace("containermanagement-api", "main-api") + "\\LinkAttach";
|
|
|
|
|
|
|
|
//var filePath = Path.Combine(pathhead, excel文件info.FilePath);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//调试地址
|
|
|
|
|
|
|
|
//var filePath = Path.Combine("D:\\ds8-solution-pro\\ds-wms-service\\DS.WMS.MainApi\\wwwroot\\LinkAttach", excel文件info.FilePath);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var pathhead = "D:\\ds8-solution-pro\\ds-wms-service\\DS.WMS.MainApi\\wwwroot";
|
|
|
|
var pathhead = "D:\\ds8-solution-pro\\ds-wms-service\\DS.WMS.MainApi\\wwwroot";
|
|
|
|
|
|
|
|
|
|
|
@ -804,11 +850,28 @@ public class CM_State_Change_TemplatImportService : CMServiceBase, ICM_State_Cha
|
|
|
|
{
|
|
|
|
{
|
|
|
|
pathhead = _environment.WebRootPath.Replace("containermanagement-api", "main-api");
|
|
|
|
pathhead = _environment.WebRootPath.Replace("containermanagement-api", "main-api");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
catch (Exception e) {
|
|
|
|
catch (Exception e)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
var filePath = Path.Combine(pathhead + "\\LinkAttach", excel文件info.FilePath);
|
|
|
|
var filePath = Path.Combine(pathhead + "\\LinkAttach", excel文件info.FilePath);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
////////////////
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
////var filePath = Path.Combine(_environment.WebRootPath, excel文件info.FilePath);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//var pathhead = "D:\\ds8-solution-pro\\ds-wms-service\\DS.WMS.MainApi\\wwwroot";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//try
|
|
|
|
|
|
|
|
//{
|
|
|
|
|
|
|
|
// pathhead = _environment.WebRootPath.Replace("containermanagement-api", "main-api");
|
|
|
|
|
|
|
|
//}
|
|
|
|
|
|
|
|
//catch (Exception e) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//var filePath = Path.Combine(pathhead + "\\LinkAttach", excel文件info.FilePath);
|
|
|
|
//var filePath = Path.Combine("D:\\ds8-solution-pro\\ds-wms-service\\DS.WMS.MainApi\\wwwroot\\LinkAttach", excel文件info.FilePath);
|
|
|
|
//var filePath = Path.Combine("D:\\ds8-solution-pro\\ds-wms-service\\DS.WMS.MainApi\\wwwroot\\LinkAttach", excel文件info.FilePath);
|
|
|
|
|
|
|
|
|
|
|
|
//var basePath = AppSetting.app(new string[] { "FileSettings", "BasePath" });
|
|
|
|
//var basePath = AppSetting.app(new string[] { "FileSettings", "BasePath" });
|
|
|
@ -1074,12 +1137,26 @@ public class CM_State_Change_TemplatImportService : CMServiceBase, ICM_State_Cha
|
|
|
|
//var filePath = Path.Combine(dirAbs, excel文件info.FilePath);
|
|
|
|
//var filePath = Path.Combine(dirAbs, excel文件info.FilePath);
|
|
|
|
|
|
|
|
|
|
|
|
//正式地址
|
|
|
|
//正式地址
|
|
|
|
var pathhead = _environment.WebRootPath.Replace("containermanagement-api", "main-api") + "\\LinkAttach";
|
|
|
|
//var pathhead = _environment.WebRootPath.Replace("containermanagement-api", "main-api") + "\\LinkAttach";
|
|
|
|
var filePath = Path.Combine(pathhead, excel文件info.FilePath);
|
|
|
|
//var filePath = Path.Combine(pathhead, excel文件info.FilePath);
|
|
|
|
|
|
|
|
|
|
|
|
//调试地址
|
|
|
|
//调试地址
|
|
|
|
//var filePath = Path.Combine("D:\\ds8-solution-pro\\ds-wms-service\\DS.WMS.MainApi\\wwwroot\\LinkAttach", excel文件info.FilePath);
|
|
|
|
//var filePath = Path.Combine("D:\\ds8-solution-pro\\ds-wms-service\\DS.WMS.MainApi\\wwwroot\\LinkAttach", excel文件info.FilePath);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var pathhead = "D:\\ds8-solution-pro\\ds-wms-service\\DS.WMS.MainApi\\wwwroot";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
try
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
pathhead = _environment.WebRootPath.Replace("containermanagement-api", "main-api");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
catch (Exception e)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var filePath = Path.Combine(pathhead + "\\LinkAttach", excel文件info.FilePath);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!File.Exists(filePath))
|
|
|
|
if (!File.Exists(filePath))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var _r0 = DataResult.Successed("添加失败", filePath, MultiLanguageConst.CM_Templat_没有找到模板);
|
|
|
|
var _r0 = DataResult.Successed("添加失败", filePath, MultiLanguageConst.CM_Templat_没有找到模板);
|
|
|
|