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