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
4bf541c5
Commit
4bf541c5
authored
Aug 15, 2024
by
wangqiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改todo
parent
1399d312
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
90 additions
and
29 deletions
+90
-29
pom.xml
dcs-plan-common/pom.xml
+14
-4
ExtDistributeRecordServiceImpl.java
...lan/core/service/impl/ExtDistributeRecordServiceImpl.java
+31
-8
ExtPlanServiceImpl.java
.../yonde/dcs/plan/core/service/impl/ExtPlanServiceImpl.java
+45
-17
No files found.
dcs-plan-common/pom.xml
View file @
4bf541c5
...
@@ -42,13 +42,24 @@
...
@@ -42,13 +42,24 @@
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>
com.yonde.dcs
</groupId>
<groupId>
com.yonde.dcs
</groupId>
<artifactId>
dcs-doc-common
</artifactId>
<artifactId>
dcs-doc-
expand-
common
</artifactId>
<version>
4.1-RELEASE
</version>
<version>
4.1-RELEASE
</version>
</dependency>
</dependency>
<!-- <dependency>-->
<!-- <groupId>com.yonde.dcs</groupId>-->
<!-- <artifactId>dcs-doc-common</artifactId>-->
<!-- <exclusions>-->
<!-- <exclusion>-->
<!-- <groupId>com.yonde.dcs</groupId>-->
<!-- <artifactId>dcs-doc-expand</artifactId>-->
<!-- </exclusion>-->
<!-- </exclusions>-->
<!-- </dependency>-->
<dependency>
<dependency>
<groupId>
com.yonde.dex
</groupId>
<groupId>
com.yonde.dex
</groupId>
<artifactId>
dex-basic-service-common
</artifactId>
<artifactId>
dex-basic-service-common
</artifactId>
<version>
4.1-RELEASE
</version>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>
com.jacob
</groupId>
<groupId>
com.jacob
</groupId>
...
@@ -78,5 +89,4 @@
...
@@ -78,5 +89,4 @@
</dependencies>
</dependencies>
</project>
</project>
dcs-plan-core/src/main/java/com/yonde/dcs/plan/core/service/impl/ExtDistributeRecordServiceImpl.java
View file @
4bf541c5
package
com
.
yonde
.
dcs
.
plan
.
core
.
service
.
impl
;
package
com
.
yonde
.
dcs
.
plan
.
core
.
service
.
impl
;
import
com.yonde.dcs.plan.common.vo.ExtDisReocredLinkVO
;
import
com.yonde.dcs.plan.common.vo.ExtDisReocredLinkVO
;
import
com.yonde.dcs.plan.common.vo.ExtIncomeContractVO
;
import
com.yonde.dcs.plan.common.vo.ExtPlanVO
;
import
com.yonde.dcs.plan.common.vo.ExtPlanVO
;
import
com.yonde.dcs.plan.core.service.AutoTaskService
;
import
com.yonde.dcs.plan.core.service.AutoTaskService
;
import
com.yonde.dcs.plan.core.service.ExtDisReocredLinkService
;
import
com.yonde.dcs.plan.core.service.ExtDisReocredLinkService
;
...
@@ -10,7 +11,11 @@ import com.yonde.dex.basedata.data.search.SearchQueryCondition;
...
@@ -10,7 +11,11 @@ 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.utils.obj.DxEntityUtils
;
import
com.yonde.dex.basedata.utils.obj.DxEntityUtils
;
import
com.yonde.dex.dao.service.util.DxPageUtils
;
import
com.yonde.dex.user.common.vo.DxOrganizationVO
;
import
com.yonde.dex.user.common.vo.DxOrganizationVO
;
import
com.yonde.dex.user.common.vo.DxUserInfoVO
;
import
com.yonde.dex.user.feign.DxUserInfoFeign
;
import
lombok.val
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
...
@@ -50,6 +55,8 @@ public class ExtDistributeRecordServiceImpl<V extends ExtDistributeRecordVO> imp
...
@@ -50,6 +55,8 @@ public class ExtDistributeRecordServiceImpl<V extends ExtDistributeRecordVO> imp
@Autowired
@Autowired
private
AutoTaskService
autoTaskService
;
private
AutoTaskService
autoTaskService
;
@Autowired
private
DxUserInfoFeign
<
DxUserInfoVO
>
dxUserInfoFeign
;
@Override
@Override
public
List
<
ExtDistributeRecordVO
>
getDisRecord
(
Long
id
)
{
public
List
<
ExtDistributeRecordVO
>
getDisRecord
(
Long
id
)
{
...
@@ -107,22 +114,20 @@ public class ExtDistributeRecordServiceImpl<V extends ExtDistributeRecordVO> imp
...
@@ -107,22 +114,20 @@ public class ExtDistributeRecordServiceImpl<V extends ExtDistributeRecordVO> imp
recordVO
.
setDistributTime
(
LocalDateTime
.
now
());
recordVO
.
setDistributTime
(
LocalDateTime
.
now
());
recordVO
.
setDistributDepart
(
null
);
recordVO
.
setDistributDepart
(
null
);
//发送者
//发送者
//todo wq: 暂时将获取用户信息代码注释,后续讨论后更改
//todo wq: 暂时将获取用户信息形式修改为深度查询的方式。原获取方法:Long userId = this.searchUserId(extPlanVO.getPlanExecutor());
Long
userId
=
null
;
DxUserInfoVO
dxUserInfoVO
=
getUserInfoByAccount
(
extPlanVO
.
getPlanExecutor
());
// Long userId = this.searchUserId(extPlanVO.getPlanExecutor());
recordVO
.
setSenderId
(
extPlanVO
.
getCreatorId
());
// recordVO.setSenderId(extPlanVO.getCreatorId());
//接收者(计划执行人)
// //接收者(计划执行人)
recordVO
.
setHandleId
(
dxUserInfoVO
==
null
?
null
:
dxUserInfoVO
.
getUserId
());
// recordVO.setHandlerId(userId);
//接收时间
//接收时间
recordVO
.
setReceiveTime
(
LocalDateTime
.
now
());
recordVO
.
setReceiveTime
(
LocalDateTime
.
now
());
List
<
DxOrganizationVO
>
organizationVOS
=
this
.
searchOrgNameByUserId
(
userId
,
"002"
);
List
<
DxOrganizationVO
>
organizationVOS
=
this
.
searchOrgNameByUserId
(
dxUserInfoVO
==
null
?
null
:
dxUserInfoVO
.
getUserId
()
,
"002"
);
//接收单位
//接收单位
if
(
CollectionUtils
.
isEmpty
(
organizationVOS
))
{
if
(
CollectionUtils
.
isEmpty
(
organizationVOS
))
{
recordVO
.
setReceiver
(
null
);
recordVO
.
setReceiver
(
null
);
}
else
{
}
else
{
for
(
DxOrganizationVO
org
:
organizationVOS
)
{
for
(
DxOrganizationVO
org
:
organizationVOS
)
{
//todo wq:将org.getOrgName() 修改为 org.getName();
//todo wq:将org.getOrgName() 修改为 org.getName();
//org.getOrgName();
org
.
getName
();
org
.
getName
();
}
}
...
@@ -141,6 +146,24 @@ public class ExtDistributeRecordServiceImpl<V extends ExtDistributeRecordVO> imp
...
@@ -141,6 +146,24 @@ public class ExtDistributeRecordServiceImpl<V extends ExtDistributeRecordVO> imp
recordVO
.
setOperator
(
OperatorType
.
ADD
);
recordVO
.
setOperator
(
OperatorType
.
ADD
);
this
.
saveRecursion
((
V
)
recordVO
);
this
.
saveRecursion
((
V
)
recordVO
);
}
}
/**
* 根据用户账户查询用户
* @param userAccount
* @return
*/
public
DxUserInfoVO
getUserInfoByAccount
(
String
userAccount
)
{
SearchQueryCondition
queryUserByAccount
=
SearchQueryCondition
.
builder
()
.
searchItems
(
SearchItems
.
builder
().
item
(
new
SearchItem
(
"userAccount"
,
SearchItem
.
Operator
.
EQ
,
userAccount
,
null
))
.
operator
(
SearchItems
.
BooleanOperator
.
AND
).
build
()).
build
();
DxPageImpl
<
DxUserInfoVO
>
dexPage
=
dxUserInfoFeign
.
findRecursion
(
queryUserByAccount
);
if
(!
CollectionUtils
.
isEmpty
(
dexPage
.
getContent
()))
{
DxUserInfoVO
DxUserInfoVO
=
DxPageUtils
.
getFirst
(
dexPage
);
return
DxUserInfoVO
;
}
return
null
;
}
}
}
dcs-plan-core/src/main/java/com/yonde/dcs/plan/core/service/impl/ExtPlanServiceImpl.java
View file @
4bf541c5
...
@@ -6,6 +6,7 @@ import cn.hutool.poi.excel.ExcelUtil;
...
@@ -6,6 +6,7 @@ import cn.hutool.poi.excel.ExcelUtil;
import
cn.hutool.poi.excel.ExcelWriter
;
import
cn.hutool.poi.excel.ExcelWriter
;
import
cn.hutool.poi.excel.StyleSet
;
import
cn.hutool.poi.excel.StyleSet
;
import
com.yonde.dcs.document.common.entity.vo.DxDocumentVO
;
import
com.yonde.dcs.document.common.entity.vo.DxDocumentVO
;
import
com.yonde.dcs.document.expand.entity.DxDocumentVOExpand
;
import
com.yonde.dcs.document.feign.DocCenterFeignService
;
import
com.yonde.dcs.document.feign.DocCenterFeignService
;
import
com.yonde.dcs.plan.common.constants.Constants
;
import
com.yonde.dcs.plan.common.constants.Constants
;
import
com.yonde.dcs.plan.common.utils.ExcelUtils
;
import
com.yonde.dcs.plan.common.utils.ExcelUtils
;
...
@@ -99,6 +100,9 @@ public class ExtPlanServiceImpl<V extends ExtPlanVO> implements ExtPlanService<V
...
@@ -99,6 +100,9 @@ public class ExtPlanServiceImpl<V extends ExtPlanVO> implements ExtPlanService<V
@Autowired
@Autowired
private
DocCenterFeignService
docCenterFeignService
;
private
DocCenterFeignService
docCenterFeignService
;
@Autowired
private
DxUserInfoFeign
<
DxUserInfoVO
>
dxUserInfoFeign
;
/**
/**
* 通过userId获取组织名
* 通过userId获取组织名
*
*
...
@@ -246,8 +250,7 @@ public class ExtPlanServiceImpl<V extends ExtPlanVO> implements ExtPlanService<V
...
@@ -246,8 +250,7 @@ public class ExtPlanServiceImpl<V extends ExtPlanVO> implements ExtPlanService<V
// int dayDiffer = DateUtils.getDayDiffer(extPlanVO.getStartTime(), extPlanVO.getCompleteTime());
// int dayDiffer = DateUtils.getDayDiffer(extPlanVO.getStartTime(), extPlanVO.getCompleteTime());
// extPlanVO.setConstructPeriod(String.valueOf(dayDiffer) + "天");
// extPlanVO.setConstructPeriod(String.valueOf(dayDiffer) + "天");
extPlanVO
.
setState
(
Constants
.
PLAN_STATE_UNOPENED
);
extPlanVO
.
setState
(
Constants
.
PLAN_STATE_UNOPENED
);
//todo wq:setDxContextId暂时注释,在2.0中DxContextId 属性在DxObjectVo类中,但在4.1中未找到
extPlanVO
.
setDxContextId
(
projectId
);
//extPlanVO.setDxContextId(projectId);
this
.
saveRecursion
((
V
)
extPlanVO
);
this
.
saveRecursion
((
V
)
extPlanVO
);
}
}
});
});
...
@@ -454,8 +457,6 @@ public class ExtPlanServiceImpl<V extends ExtPlanVO> implements ExtPlanService<V
...
@@ -454,8 +457,6 @@ public class ExtPlanServiceImpl<V extends ExtPlanVO> implements ExtPlanService<V
.
searchItems
(
SearchItems
.
builder
().
item
(
.
searchItems
(
SearchItems
.
builder
().
item
(
new
SearchItem
(
"number"
,
SearchItem
.
Operator
.
EQ
,
number
,
null
))
new
SearchItem
(
"number"
,
SearchItem
.
Operator
.
EQ
,
number
,
null
))
.
operator
(
SearchItems
.
BooleanOperator
.
AND
).
build
()).
build
();
.
operator
(
SearchItems
.
BooleanOperator
.
AND
).
build
()).
build
();
//todo wq:在4.1中找到类似的方法,将2.0代码注释。
//DxPageImpl<DxDocumentVO> recursion = documentService.findRecursion(query);
DxPageImpl
<
DxDocumentVO
>
recursion
=
docCenterFeignService
.
findRecursion
(
query
);
DxPageImpl
<
DxDocumentVO
>
recursion
=
docCenterFeignService
.
findRecursion
(
query
);
if
(
org
.
springframework
.
util
.
CollectionUtils
.
isEmpty
(
recursion
.
getContent
()))
{
if
(
org
.
springframework
.
util
.
CollectionUtils
.
isEmpty
(
recursion
.
getContent
()))
{
return
null
;
return
null
;
...
@@ -833,17 +834,16 @@ public class ExtPlanServiceImpl<V extends ExtPlanVO> implements ExtPlanService<V
...
@@ -833,17 +834,16 @@ public class ExtPlanServiceImpl<V extends ExtPlanVO> implements ExtPlanService<V
String
stabledIds
=
stableId
.
substring
(
37
);
String
stabledIds
=
stableId
.
substring
(
37
);
String
substring
=
stabledIds
.
substring
(
stabledIds
.
lastIndexOf
(
"-"
,
stabledIds
.
lastIndexOf
(
"-"
,
stabledIds
.
lastIndexOf
(
"-"
)
-
1
)
-
1
)
+
1
);
String
substring
=
stabledIds
.
substring
(
stabledIds
.
lastIndexOf
(
"-"
,
stabledIds
.
lastIndexOf
(
"-"
,
stabledIds
.
lastIndexOf
(
"-"
)
-
1
)
-
1
)
+
1
);
String
[]
split
=
substring
.
split
(
"-"
);
String
[]
split
=
substring
.
split
(
"-"
);
DxDocumentVOExpand
<
DxDocumentVO
>
dxDocumentExpand
=
doc
.
getDxDocumentExpand
();
if
(
split
.
length
==
2
)
{
if
(
split
.
length
==
2
)
{
//todo wq:在4.1中DxDocumentVO对象无下面注释属性
dxDocumentExpand
.
setOneLevCategory
(
this
.
searchModelName
(
split
[
0
]));
// doc.setOneLevCategory(this.searchModelName(split[0]));
dxDocumentExpand
.
setTwoLevCategory
(
this
.
searchModelName
(
split
[
1
]));
// doc.setTwoLevCategory(this.searchModelName(split[1]));
dxDocumentExpand
.
setThreeLevCategory
(
null
);
// doc.setThreeLevCategory(null);
}
}
if
(
split
.
length
==
3
)
{
if
(
split
.
length
==
3
)
{
//todo wq:在4.1中DxDocumentVO对象无下面注释属性
dxDocumentExpand
.
setOneLevCategory
(
this
.
searchModelName
(
split
[
0
]));
// doc.setOneLevCategory(this.searchModelName(split[0]));
dxDocumentExpand
.
setTwoLevCategory
(
this
.
searchModelName
(
split
[
1
]));
// doc.setTwoLevCategory(this.searchModelName(split[1]));
dxDocumentExpand
.
setThreeLevCategory
(
this
.
searchModelName
(
split
[
2
]));
// doc.setThreeLevCategory(this.searchModelName(split[2]));
}
}
}
}
...
@@ -909,13 +909,13 @@ public class ExtPlanServiceImpl<V extends ExtPlanVO> implements ExtPlanService<V
...
@@ -909,13 +909,13 @@ public class ExtPlanServiceImpl<V extends ExtPlanVO> implements ExtPlanService<V
recordVO
.
setDistributTime
(
LocalDateTime
.
now
());
recordVO
.
setDistributTime
(
LocalDateTime
.
now
());
recordVO
.
setDistributDepart
(
null
);
recordVO
.
setDistributDepart
(
null
);
//发送者
//发送者
//todo wq:recordVO 中没有setSenderId和setHandlerId属性,暂时注释。
recordVO
.
setSenderId
(
extPlanVO
.
getCreatorId
());
// recordVO.setSenderId(extPlanVO.getCreatorId());
//todo wq:获取用户方式修改未深度查询方式,原2.0:this.searchUserId(extPlanVO.getPlanExecutor())
//todo wq:获取用户id暂时返回null
DxUserInfoVO
dxUserInfoVO
=
getUserInfoByAccount
(
extPlanVO
.
getPlanExecutor
());
// Long userId = this.searchUserId(extPlanVO.getPlanExecutor());
// Long userId = this.searchUserId(extPlanVO.getPlanExecutor());
Long
userId
=
null
;
Long
userId
=
dxUserInfoVO
==
null
?
null
:
dxUserInfoVO
.
getUserId
()
;
//接收者(计划执行人)
//接收者(计划执行人)
// recordVO.setHandler
Id(userId);
recordVO
.
setHandle
Id
(
userId
);
//接收时间
//接收时间
recordVO
.
setReceiveTime
(
LocalDateTime
.
now
());
recordVO
.
setReceiveTime
(
LocalDateTime
.
now
());
List
<
DxOrganizationVO
>
organizationVOS
=
this
.
searchOrgNameByUserId
(
userId
,
"002"
);
List
<
DxOrganizationVO
>
organizationVOS
=
this
.
searchOrgNameByUserId
(
userId
,
"002"
);
...
@@ -944,6 +944,34 @@ public class ExtPlanServiceImpl<V extends ExtPlanVO> implements ExtPlanService<V
...
@@ -944,6 +944,34 @@ public class ExtPlanServiceImpl<V extends ExtPlanVO> implements ExtPlanService<V
distributeRecordService
.
saveRecursion
(
recordVO
);
distributeRecordService
.
saveRecursion
(
recordVO
);
}
}
/**
* 通过id查询模型名称
*/
private
String
searchModelName
(
String
id
)
{
ModelDefinitionVO
definitionVO
=
modelDefinitionService
.
get
(
Long
.
valueOf
(
id
));
if
(
StringUtils
.
isEmpty
(
definitionVO
))
{
return
null
;
}
return
definitionVO
.
getName
();
}
/**
* 根据用户账户查询用户
* @param userAccount
* @return
*/
public
DxUserInfoVO
getUserInfoByAccount
(
String
userAccount
)
{
SearchQueryCondition
queryUserByAccount
=
SearchQueryCondition
.
builder
()
.
searchItems
(
SearchItems
.
builder
().
item
(
new
SearchItem
(
"userAccount"
,
SearchItem
.
Operator
.
EQ
,
userAccount
,
null
))
.
operator
(
SearchItems
.
BooleanOperator
.
AND
).
build
()).
build
();
DxPageImpl
<
DxUserInfoVO
>
dexPage
=
dxUserInfoFeign
.
findRecursion
(
queryUserByAccount
);
if
(!
CollectionUtils
.
isEmpty
(
dexPage
.
getContent
()))
{
DxUserInfoVO
DxUserInfoVO
=
DxPageUtils
.
getFirst
(
dexPage
);
return
DxUserInfoVO
;
}
return
null
;
}
}
}
...
...
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