|
|
|
@ -262,8 +262,27 @@ namespace Myshipping.Application
|
|
|
|
|
entity.UpdatedUserId = UserManager.UserId;
|
|
|
|
|
entity.UpdatedUserName = UserManager.Name;
|
|
|
|
|
|
|
|
|
|
if(string.IsNullOrWhiteSpace(model.DEVELOP_VERSION) && !string.IsNullOrWhiteSpace(model.RELEASE_VERSION))
|
|
|
|
|
entity.DEVELOP_VERSION = "DEVELOP";
|
|
|
|
|
if (!isSetEnable)
|
|
|
|
|
{
|
|
|
|
|
entity.IS_ENABLE = model.IS_ENABLE;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
entity.IS_LOCK = model.IS_LOCK;
|
|
|
|
|
|
|
|
|
|
if (string.IsNullOrWhiteSpace(model.DEVELOP_VERSION))
|
|
|
|
|
{
|
|
|
|
|
if(!string.IsNullOrWhiteSpace(model.RELEASE_VERSION))
|
|
|
|
|
{
|
|
|
|
|
entity.DEVELOP_VERSION = "DEVELOP";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
entity.DEVELOP_VERSION = model.DEVELOP_VERSION;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
currVersion = entity.DEVELOP_VERSION;
|
|
|
|
|
|
|
|
|
|
if (info.StatusSkuList != null && info.StatusSkuList.Count > 0)
|
|
|
|
|
{
|
|
|
|
@ -290,7 +309,7 @@ namespace Myshipping.Application
|
|
|
|
|
it.IS_LOCK
|
|
|
|
|
}).ExecuteCommandAsync();
|
|
|
|
|
|
|
|
|
|
currVersion = model.DEVELOP_VERSION;
|
|
|
|
|
currVersion = entity.DEVELOP_VERSION;
|
|
|
|
|
|
|
|
|
|
//批量删除服务流程与服务项目关系(物理删除)
|
|
|
|
|
_serviceWorkFlowProjectRelationRepository.EntityContext.Deleteable<ServiceWorkFlowProjectRelation>()
|
|
|
|
@ -529,16 +548,18 @@ namespace Myshipping.Application
|
|
|
|
|
1、通过服务活动ID获取所有关联的服务流程详情列表
|
|
|
|
|
2、轮询服务流程列表,组织详细的服务流程列表
|
|
|
|
|
*/
|
|
|
|
|
var activitiesList = _serviceWorkFlowActivitiesRelationRepository.AsQueryable()
|
|
|
|
|
.LeftJoin<ServiceWorkFlowBaseInfo>((rela, wf) => rela.SERVICE_WORKFLOW_ID == wf.PK_ID)
|
|
|
|
|
var activitiesList = _serviceWorkFlowActivitiesRelationRepository.AsQueryable().Filter(null, true)
|
|
|
|
|
.LeftJoin<ServiceWorkFlowBaseInfo>((rela, wf) => rela.SERVICE_WORKFLOW_ID == wf.PK_ID
|
|
|
|
|
&& rela.WF_VERSION == wf.RELEASE_VERSION)
|
|
|
|
|
.Where((rela,wf) => activitiesArgs.Contains(rela.SERVICE_ACTIVITIES_ID)
|
|
|
|
|
&& !wf.IsDeleted && wf.IS_ENABLE == 1 && !string.IsNullOrWhiteSpace(wf.RELEASE_VERSION))
|
|
|
|
|
&& !wf.IsDeleted && wf.IS_ENABLE == 1)
|
|
|
|
|
.Select((rela, wf) => wf).Distinct().ToList();
|
|
|
|
|
|
|
|
|
|
var subActList = _serviceWorkFlowActivitiesSubRelationRepository.AsQueryable()
|
|
|
|
|
.LeftJoin<ServiceWorkFlowBaseInfo>((rela, wf) => rela.SERVICE_WORKFLOW_ID == wf.PK_ID)
|
|
|
|
|
var subActList = _serviceWorkFlowActivitiesSubRelationRepository.AsQueryable().Filter(null, true)
|
|
|
|
|
.LeftJoin<ServiceWorkFlowBaseInfo>((rela, wf) => rela.SERVICE_WORKFLOW_ID == wf.PK_ID
|
|
|
|
|
&& rela.WF_VERSION == wf.RELEASE_VERSION)
|
|
|
|
|
.Where((rela, wf) => activitiesArgs.Contains(rela.SUB_SERVICE_ACTIVITIES_ID)
|
|
|
|
|
&& !wf.IsDeleted && wf.IS_ENABLE == 1 && !string.IsNullOrWhiteSpace(wf.RELEASE_VERSION))
|
|
|
|
|
&& !wf.IsDeleted && wf.IS_ENABLE == 1)
|
|
|
|
|
.Select((rela, wf) => wf).Distinct().ToList();
|
|
|
|
|
|
|
|
|
|
if(subActList.Count > 0)
|
|
|
|
@ -558,41 +579,41 @@ namespace Myshipping.Application
|
|
|
|
|
var wfArg = activitiesList.Select(a => a.PK_ID).ToArray();
|
|
|
|
|
|
|
|
|
|
var mergeList =
|
|
|
|
|
_serviceWorkFlowBaseRepository.AsQueryable()
|
|
|
|
|
_serviceWorkFlowBaseRepository.AsQueryable().Filter(null, true)
|
|
|
|
|
.LeftJoin<ServiceWorkFlowActivitiesRelation>((wf, rela) => wf.PK_ID == rela.SERVICE_WORKFLOW_ID
|
|
|
|
|
&& wf.RELEASE_VERSION == rela.WF_VERSION)
|
|
|
|
|
.Where(wf => wfArg.Contains(wf.PK_ID))
|
|
|
|
|
.Select((wf, rela) => new { WF = wf, Rela = rela })
|
|
|
|
|
.LeftJoin<ServiceWorkFlowActivitiesInfo>((rela, act) =>
|
|
|
|
|
rela.Rela.SERVICE_ACTIVITIES_ID == act.PK_ID)
|
|
|
|
|
.LeftJoin<StatusSkuBaseInfo>((rela, act, sku) =>
|
|
|
|
|
.LeftJoin<ServiceWorkFlowActivitiesInfo>((wf,rela, act) =>
|
|
|
|
|
rela.SERVICE_ACTIVITIES_ID == act.PK_ID && wf.RELEASE_VERSION == rela.WF_VERSION)
|
|
|
|
|
.LeftJoin<StatusSkuBaseInfo>((wf,rela, act, sku) =>
|
|
|
|
|
act.STATUS_SKU_ID == sku.PK_ID)
|
|
|
|
|
.Select((rela, act, sku) =>
|
|
|
|
|
new { WF = rela.WF, Act = act, Sku = sku, SortNo = rela.Rela.SORT_NO, IsSub = rela.Rela.IS_CONTAINS_SUB, ValType = rela.Rela.VAL_TYPE })
|
|
|
|
|
.Where((wf) => wfArg.Contains(wf.PK_ID))
|
|
|
|
|
.Select((wf,rela, act, sku) =>
|
|
|
|
|
new { WF = wf, Act = act, Sku = sku, SortNo = rela.SORT_NO, IsSub = rela.IS_CONTAINS_SUB, ValType = rela.VAL_TYPE })
|
|
|
|
|
.ToList();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var mergeSubList =
|
|
|
|
|
_serviceWorkFlowBaseRepository.AsQueryable()
|
|
|
|
|
_serviceWorkFlowBaseRepository.AsQueryable().Filter(null, true)
|
|
|
|
|
.LeftJoin<ServiceWorkFlowActivitiesSubRelation>((wf, rela) => wf.PK_ID == rela.SERVICE_WORKFLOW_ID
|
|
|
|
|
&& wf.RELEASE_VERSION == rela.WF_VERSION)
|
|
|
|
|
.Where(wf => wfArg.Contains(wf.PK_ID))
|
|
|
|
|
.Select((wf, rela) => new { WF = wf, Rela = rela })
|
|
|
|
|
.LeftJoin<ServiceWorkFlowActivitiesInfo>((rela, act) =>
|
|
|
|
|
rela.Rela.SUB_SERVICE_ACTIVITIES_ID == act.PK_ID)
|
|
|
|
|
.LeftJoin<StatusSkuBaseInfo>((rela, act, sku) =>
|
|
|
|
|
.LeftJoin<ServiceWorkFlowActivitiesInfo>((wf, rela, act) =>
|
|
|
|
|
rela.SUB_SERVICE_ACTIVITIES_ID == act.PK_ID && wf.RELEASE_VERSION == rela.WF_VERSION)
|
|
|
|
|
.LeftJoin<StatusSkuBaseInfo>((wf, rela, act, sku) =>
|
|
|
|
|
act.STATUS_SKU_ID == sku.PK_ID)
|
|
|
|
|
.Select((rela, act, sku) =>
|
|
|
|
|
new { WF = rela.WF, Act = act, Sku = sku, SortNo = rela.Rela.SORT_NO, ParentId = rela.Rela.SERVICE_ACTIVITIES_ID, ValType = rela.Rela.VAL_TYPE })
|
|
|
|
|
.Where((wf) => wfArg.Contains(wf.PK_ID))
|
|
|
|
|
.Select((wf,rela, act, sku) =>
|
|
|
|
|
new { WF = wf, Act = act, Sku = sku, SortNo = rela.SORT_NO, ParentId = rela.SERVICE_ACTIVITIES_ID, ValType = rela.VAL_TYPE })
|
|
|
|
|
.ToList();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var prjectList = _serviceWorkFlowBaseRepository.AsQueryable()
|
|
|
|
|
var prjectList =
|
|
|
|
|
_serviceWorkFlowBaseRepository.AsQueryable().Filter(null, true)
|
|
|
|
|
.LeftJoin<ServiceWorkFlowProjectRelation>((wf, rela) => wf.PK_ID == rela.SERVICE_WORKFLOW_ID
|
|
|
|
|
&& wf.RELEASE_VERSION == rela.WF_VERSION)
|
|
|
|
|
.Select((wf,rela)=> new { WF = wf, Rela = rela })
|
|
|
|
|
.LeftJoin<ServiceProjectBaseInfo>((rela, prj) =>
|
|
|
|
|
rela.Rela.SERVICE_PROJECT_ID == prj.PK_ID)
|
|
|
|
|
.Select((rela, prj) => new{ WF = rela.WF, Rela = rela.Rela,Prj = prj }).ToList();
|
|
|
|
|
.LeftJoin<ServiceProjectBaseInfo>((wf,rela, prj) =>
|
|
|
|
|
rela.SERVICE_PROJECT_ID == prj.PK_ID)
|
|
|
|
|
.Where((wf) => wfArg.Contains(wf.PK_ID))
|
|
|
|
|
.Select((wf,rela, prj) => new{ WF = wf, Rela = rela,Prj = prj }).ToList();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var list = mergeList.GroupBy(a => a.WF.PK_ID)
|
|
|
|
@ -615,7 +636,8 @@ namespace Myshipping.Application
|
|
|
|
|
{
|
|
|
|
|
actModel.SubList = mergeSubList.Where(
|
|
|
|
|
b =>
|
|
|
|
|
b.WF.PK_ID == a.WF.PK_ID && b.Act.PK_ID == a.Act.PK_ID).OrderBy(b => b.SortNo)
|
|
|
|
|
b.WF.PK_ID == a.WF.PK_ID && b.ParentId == a.Act.PK_ID)
|
|
|
|
|
.OrderBy(b => b.SortNo)
|
|
|
|
|
.Select(b =>
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
@ -1233,14 +1255,15 @@ namespace Myshipping.Application
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
if (lastReleaseInfo != null)
|
|
|
|
|
{
|
|
|
|
|
releaseInfo.LAST_PK_ID = lastReleaseInfo.PK_ID;
|
|
|
|
|
lastReleaseInfo.IS_DEL = 1;
|
|
|
|
|
|
|
|
|
|
lastReleaseInfo.IS_DEL = 1;
|
|
|
|
|
|
|
|
|
|
_serviceWorkFlowReleaseInfoRepository.AsUpdateable(lastReleaseInfo).UpdateColumns(it => new
|
|
|
|
|
{
|
|
|
|
|
it.IS_DEL
|
|
|
|
|
}).ExecuteCommand();
|
|
|
|
|
_serviceWorkFlowReleaseInfoRepository.AsUpdateable(lastReleaseInfo).UpdateColumns(it => new
|
|
|
|
|
{
|
|
|
|
|
it.IS_DEL
|
|
|
|
|
}).ExecuteCommand();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//写入发布表
|
|
|
|
|
_serviceWorkFlowReleaseInfoRepository.Insert(releaseInfo);
|
|
|
|
|