Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dcs-plan
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
INET-TWO
server
dcs-plan
Commits
2557ad98
Commit
2557ad98
authored
Oct 10, 2024
by
wangqiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改IED和采购计划查询计划是根据项目id和计划编号查询--》原只是根据编号查询
parent
80b58b81
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
3 deletions
+24
-3
IEDPlanExcelListenner.java
...m/yonde/dcs/plan/core/listener/IEDPlanExcelListenner.java
+10
-1
PurchasePlanExcelReadListenner.java
...cs/plan/core/listener/PurchasePlanExcelReadListenner.java
+12
-1
ExtIEDPlanServiceImpl.java
...nde/dcs/plan/core/service/impl/ExtIEDPlanServiceImpl.java
+2
-1
No files found.
dcs-plan-core/src/main/java/com/yonde/dcs/plan/core/listener/IEDPlanExcelListenner.java
View file @
2557ad98
...
@@ -205,8 +205,17 @@ public class IEDPlanExcelListenner extends AnalysisEventListener<ExtIEDPlanExcel
...
@@ -205,8 +205,17 @@ public class IEDPlanExcelListenner extends AnalysisEventListener<ExtIEDPlanExcel
}
}
public
ExtIEDPlanVO
getIEDPlanByFileNumber
(
String
fileNumber
)
{
public
ExtIEDPlanVO
getIEDPlanByFileNumber
(
String
fileNumber
)
{
SearchItems
iedPlanSearch
=
new
SearchItems
();
SearchItem
fileNumberFilter
=
new
SearchItem
(
"fileNumber"
,
SearchItem
.
Operator
.
EQ
,
fileNumber
,
(
Object
)
null
);
SearchItem
projectIdFilter
=
new
SearchItem
(
"dxContextId"
,
SearchItem
.
Operator
.
EQ
,
projectId
,
(
Object
)
null
);
iedPlanSearch
.
addItem
(
fileNumberFilter
);
iedPlanSearch
.
addItem
(
projectIdFilter
);
SearchQueryCondition
searchQuery
=
SearchQueryCondition
.
builder
().
searchItems
(
iedPlanSearch
).
build
();
//根据文件编号查询IED计划
//根据文件编号查询IED计划
DxPageImpl
<
ExtIEDPlanVO
>
IEDPlanPage
=
extIEDPlanService
.
findRecursion
(
SearchUtil
.
buildQuery
(
"fileNumber"
,
SearchItem
.
Operator
.
EQ
,
fileNumber
));
// DxPageImpl<ExtIEDPlanVO> IEDPlanPage = extIEDPlanService.findRecursion(SearchUtil.buildQuery("fileNumber", SearchItem.Operator.EQ, fileNumber));
DxPageImpl
<
ExtIEDPlanVO
>
IEDPlanPage
=
extIEDPlanService
.
findRecursion
(
searchQuery
);
if
(!
CollectionUtils
.
isEmpty
(
IEDPlanPage
.
getContent
()))
{
if
(!
CollectionUtils
.
isEmpty
(
IEDPlanPage
.
getContent
()))
{
ExtIEDPlanVO
extIEDPlanVOForDB
=
DxPageUtils
.
getFirst
(
IEDPlanPage
);
ExtIEDPlanVO
extIEDPlanVOForDB
=
DxPageUtils
.
getFirst
(
IEDPlanPage
);
return
extIEDPlanVOForDB
;
return
extIEDPlanVOForDB
;
...
...
dcs-plan-core/src/main/java/com/yonde/dcs/plan/core/listener/PurchasePlanExcelReadListenner.java
View file @
2557ad98
...
@@ -12,6 +12,8 @@ import com.yonde.dcs.plan.core.service.ExtPuchasePlanAttributeService;
...
@@ -12,6 +12,8 @@ import com.yonde.dcs.plan.core.service.ExtPuchasePlanAttributeService;
import
com.yonde.dcs.plan.core.util.CommonUtils
;
import
com.yonde.dcs.plan.core.util.CommonUtils
;
import
com.yonde.dcs.plan.entity.po.ExtPuchasePlanAttribute
;
import
com.yonde.dcs.plan.entity.po.ExtPuchasePlanAttribute
;
import
com.yonde.dex.basedata.data.search.SearchItem
;
import
com.yonde.dex.basedata.data.search.SearchItem
;
import
com.yonde.dex.basedata.data.search.SearchItems
;
import
com.yonde.dex.basedata.data.search.SearchQueryCondition
;
import
com.yonde.dex.basedata.entity.data.DxPageImpl
;
import
com.yonde.dex.basedata.entity.data.DxPageImpl
;
import
com.yonde.dex.basedata.entity.data.OperatorType
;
import
com.yonde.dex.basedata.entity.data.OperatorType
;
import
com.yonde.dex.basedata.exception.DxBusinessException
;
import
com.yonde.dex.basedata.exception.DxBusinessException
;
...
@@ -183,8 +185,17 @@ public class PurchasePlanExcelReadListenner extends AnalysisEventListener<ExtPuc
...
@@ -183,8 +185,17 @@ public class PurchasePlanExcelReadListenner extends AnalysisEventListener<ExtPuc
* @return
* @return
*/
*/
public
ExtPuchasePlanAttributeVO
getPurchasePlanByPlanCode
(
String
planCode
){
public
ExtPuchasePlanAttributeVO
getPurchasePlanByPlanCode
(
String
planCode
){
SearchItems
purchasePlanSearch
=
new
SearchItems
();
SearchItem
planCodeFilter
=
new
SearchItem
(
"planCode"
,
SearchItem
.
Operator
.
EQ
,
planCode
,
(
Object
)
null
);
SearchItem
projectIdFilter
=
new
SearchItem
(
"dxContextId"
,
SearchItem
.
Operator
.
EQ
,
projectId
,
(
Object
)
null
);
purchasePlanSearch
.
addItem
(
planCodeFilter
);
purchasePlanSearch
.
addItem
(
projectIdFilter
);
SearchQueryCondition
searchQuery
=
SearchQueryCondition
.
builder
().
searchItems
(
purchasePlanSearch
).
build
();
//根据计划编码获取数据库中采购计划数据
//根据计划编码获取数据库中采购计划数据
DxPageImpl
<
ExtPuchasePlanAttributeVO
>
dxPuchasePlanPage
=
extPuchasePlanAttributeService
.
findRecursion
(
SearchUtil
.
buildQuery
(
"planCode"
,
SearchItem
.
Operator
.
EQ
,
planCode
));
//DxPageImpl<ExtPuchasePlanAttributeVO> dxPuchasePlanPage = extPuchasePlanAttributeService.findRecursion(SearchUtil.buildQuery("planCode", SearchItem.Operator.EQ, planCode));
DxPageImpl
<
ExtPuchasePlanAttributeVO
>
dxPuchasePlanPage
=
extPuchasePlanAttributeService
.
findRecursion
(
searchQuery
);
if
(!
CollectionUtils
.
isEmpty
(
dxPuchasePlanPage
.
getContent
()))
{
if
(!
CollectionUtils
.
isEmpty
(
dxPuchasePlanPage
.
getContent
()))
{
ExtPuchasePlanAttributeVO
extPurPlanForDB
=
DxPageUtils
.
getFirst
(
dxPuchasePlanPage
);
ExtPuchasePlanAttributeVO
extPurPlanForDB
=
DxPageUtils
.
getFirst
(
dxPuchasePlanPage
);
return
extPurPlanForDB
;
return
extPurPlanForDB
;
...
...
dcs-plan-core/src/main/java/com/yonde/dcs/plan/core/service/impl/ExtIEDPlanServiceImpl.java
View file @
2557ad98
...
@@ -207,11 +207,12 @@ public class ExtIEDPlanServiceImpl<V extends ExtIEDPlanVO> implements ExtIEDPlan
...
@@ -207,11 +207,12 @@ public class ExtIEDPlanServiceImpl<V extends ExtIEDPlanVO> implements ExtIEDPlan
DxDocumentVO
dxDocumentVOForDB
=
extDxDocumentServiceFeign
.
saveRecursion
(
dxDocumentVO
);
DxDocumentVO
dxDocumentVOForDB
=
extDxDocumentServiceFeign
.
saveRecursion
(
dxDocumentVO
);
//保存文档与IED计划的关系
//保存文档与IED计划的关系
ExtIEDPlanDocLinkVO
extIEDPlanDocLinkVO
=
new
ExtIEDPlanDocLinkVO
();
ExtIEDPlanDocLinkVO
extIEDPlanDocLinkVO
=
new
ExtIEDPlanDocLinkVO
();
extIEDPlanDocLinkVO
.
setTargetId
(
dxDocumentVOForDB
.
get
Version
Id
());
extIEDPlanDocLinkVO
.
setTargetId
(
dxDocumentVOForDB
.
getId
());
extIEDPlanDocLinkVO
.
setSourceId
(
extIEDPlanVO
.
getId
());
extIEDPlanDocLinkVO
.
setSourceId
(
extIEDPlanVO
.
getId
());
extIEDPlanDocLinkVO
.
setOperator
(
OperatorType
.
ADD
);
extIEDPlanDocLinkVO
.
setOperator
(
OperatorType
.
ADD
);
extIEDPlanDocLinkService
.
saveRecursion
(
extIEDPlanDocLinkVO
);
extIEDPlanDocLinkService
.
saveRecursion
(
extIEDPlanDocLinkVO
);
return
ApiResult
.
SUCCESS
;
return
ApiResult
.
SUCCESS
;
}
}
...
...
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