Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
B
BasicAPI
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
杜科
BasicAPI
Commits
f089ffce
Commit
f089ffce
authored
Apr 28, 2023
by
shyWang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PDM前端改造
文件夹功能、查找E视图接口
parent
3f020ba2
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
47 additions
and
5 deletions
+47
-5
AbstractBaseController.java
...com/yonde/basedata/controller/AbstractBaseController.java
+3
-4
BaseSearchService.java
src/com/yonde/basedata/service/BaseSearchService.java
+1
-1
DxPartController.java
src/com/yonde/part/controller/DxPartController.java
+13
-0
DxPartService.java
src/com/yonde/part/service/DxPartService.java
+30
-0
No files found.
src/com/yonde/basedata/controller/AbstractBaseController.java
View file @
f089ffce
...
...
@@ -7,7 +7,6 @@ import com.yonde.basedata.search.SearchQueryCondition;
import
com.yonde.basedata.service.BaseSearchService
;
import
com.yonde.basedata.vo.IdVO
;
import
com.yonde.basedata.vo.lc.LifecycleTemplateVO
;
import
com.yonde.change.service.DXChangeOrderService
;
import
com.yonde.common.ObjectsUtil
;
import
com.yonde.common.entity.DXFolder
;
import
com.yonde.part.vo.DxPartDescribeLinkVO
;
...
...
@@ -119,13 +118,13 @@ public class AbstractBaseController {
@GetMapping
({
"/folder/getFolderList"
})
//@ApiOperation("获取副本")
public
DXFolder
get
WorkingCopy
(
@RequestParam
String
containerName
,
@RequestParam
(
value
=
"id"
,
required
=
false
)
Lo
ng
id
,
HttpServletRequest
request
)
{
public
DXFolder
get
FolderList
(
@RequestParam
String
containerName
,
@RequestParam
(
value
=
"id"
,
required
=
false
)
Stri
ng
id
,
HttpServletRequest
request
)
{
DXFolder
dxFolder
=
null
;
try
{
if
(
ObjectsUtil
.
isNull
(
id
)
||
id
==
0
)
{
if
(
StringUtils
.
isEmpty
(
id
)
)
{
dxFolder
=
BaseSearchService
.
getFolderList
(
containerName
);
}
else
{
dxFolder
=
BaseSearchService
.
getFolderList
(
containerName
,
id
);
dxFolder
=
BaseSearchService
.
getFolderList
(
containerName
,
Long
.
valueOf
(
id
)
);
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
...
...
src/com/yonde/basedata/service/BaseSearchService.java
View file @
f089ffce
...
...
@@ -360,7 +360,7 @@ public class BaseSearchService <V extends IdVO> implements RemoteAccess {
private
static
DXFolder
getDxFolder
(
Folder
folder
)
throws
WTException
{
DXFolder
dxFolder
=
new
DXFolder
(
folder
);
List
<
SubFolder
>
subFolders
=
FolderUtil
.
getSubFolders
(
folder
,
false
);
if
(
CollectionUtils
.
isEmpty
(
subFolders
))
{
if
(
CollectionUtils
.
is
Not
Empty
(
subFolders
))
{
List
<
DXFolder
>
subList
=
new
ArrayList
<
DXFolder
>();
for
(
SubFolder
subFolder
:
subFolders
)
{
subList
.
add
(
new
DXFolder
(
subFolder
));
...
...
src/com/yonde/part/controller/DxPartController.java
View file @
f089ffce
...
...
@@ -235,4 +235,17 @@ public class DxPartController extends AbstractBaseController {
}
return
resultList
;
}
@GetMapping
({
"/pdmPlanning/search"
})
//@ApiOperation("获取更改相关对象")
public
DxPartVO
getPdmPlanningPart
(
@RequestParam
(
value
=
"number"
)
String
number
,
@RequestParam
(
value
=
"version"
)
String
version
,
HttpServletRequest
request
)
{
DxPartVO
dxPartVO
=
null
;
try
{
//下游对等件
dxPartVO
=
DxPartService
.
getPlanningPart
(
number
,
version
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
return
dxPartVO
;
}
}
src/com/yonde/part/service/DxPartService.java
View file @
f089ffce
...
...
@@ -25,6 +25,7 @@ import wt.session.SessionContext;
import
wt.session.SessionHelper
;
import
wt.session.SessionServerHelper
;
import
wt.util.WTException
;
import
wt.vc.VersionControlHelper
;
import
wt.vc.views.ViewHelper
;
import
wt.vc.wip.WorkInProgressHelper
;
...
...
@@ -675,4 +676,33 @@ public class DxPartService implements RemoteAccess, Serializable {
}
return
resultList
;
}
/**
* 获取planning
* @param number
* @return
* @throws Exception
*/
public
static
DxPartVO
getPlanningPart
(
String
number
,
String
version
)
throws
Exception
{
if
(!
RemoteMethodServer
.
ServerFlag
)
{
return
(
DxPartVO
)
RemoteMethodServer
.
getDefault
().
invoke
(
"getPlanningPart"
,
DxPartService
.
class
.
getName
(),
null
,
new
Class
[]
{
String
.
class
,
String
.
class
},
new
Object
[]
{
number
,
version
});
}
DxPartVO
nextVersion
=
null
;
CommonUtil
.
initSessionContext
(
null
);
WTPart
wtPart
=
DxPartUtil
.
getPartByNumberAndView
(
number
,
SearchOperatorEnumUtil
.
viewMap
.
get
(
"2"
),
false
);
if
(
ObjectsUtil
.
nonNull
(
wtPart
))
{
QueryResult
qr
=
VersionControlHelper
.
service
.
allVersionsOf
(
wtPart
.
getMaster
());
while
(
qr
.
hasMoreElements
())
{
wtPart
=
(
WTPart
)
qr
.
nextElement
();
if
(
wtPart
.
getViewName
().
equals
(
SearchOperatorEnumUtil
.
viewMap
.
get
(
"2"
))
&&
wtPart
.
getVersionIdentifier
().
getValue
().
startsWith
(
version
))
{
nextVersion
=
new
DxPartVO
(
wtPart
);
break
;
}
}
}
return
nextVersion
;
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment