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
76ab24a5
Commit
76ab24a5
authored
Aug 13, 2024
by
wangqiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
在ExtPlan中增加“生成计划分发记录对象方法”接口
parent
881f6eae
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
77 additions
and
0 deletions
+77
-0
ExtPlanService.java
.../java/com/yonde/dcs/plan/core/service/ExtPlanService.java
+8
-0
ExtPlanServiceImpl.java
.../yonde/dcs/plan/core/service/impl/ExtPlanServiceImpl.java
+63
-0
ExtPlanServiceFeign.java
...in/java/com/yonde/dcs/plan/feign/ExtPlanServiceFeign.java
+6
-0
No files found.
dcs-plan-core/src/main/java/com/yonde/dcs/plan/core/service/ExtPlanService.java
View file @
76ab24a5
...
@@ -77,4 +77,12 @@ public interface ExtPlanService<V extends ExtPlanVO> extends ExtPlanServiceShado
...
@@ -77,4 +77,12 @@ public interface ExtPlanService<V extends ExtPlanVO> extends ExtPlanServiceShado
*/
*/
void
searchFileType
(
String
fileType
,
DxDocumentVO
doc
);
void
searchFileType
(
String
fileType
,
DxDocumentVO
doc
);
/**
* 生成计划分发记录对象方法
*
* @param extPlanVO
*/
void
generatePlanDistributeRecord
(
ExtPlanVO
extPlanVO
);
}
}
dcs-plan-core/src/main/java/com/yonde/dcs/plan/core/service/impl/ExtPlanServiceImpl.java
View file @
76ab24a5
...
@@ -21,6 +21,7 @@ import com.yonde.dex.basedata.entity.api.ApiResult;
...
@@ -21,6 +21,7 @@ import com.yonde.dex.basedata.entity.api.ApiResult;
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
;
import
com.yonde.dex.basedata.utils.obj.DxEntityUtils
;
import
com.yonde.dex.bmodel.common.entity.vo.ModelDefinitionVO
;
import
com.yonde.dex.bmodel.common.entity.vo.ModelDefinitionVO
;
import
com.yonde.dex.bmodel.feign.api.ModelDefinitionFeignService
;
import
com.yonde.dex.bmodel.feign.api.ModelDefinitionFeignService
;
import
com.yonde.dex.dao.service.util.DxPageUtils
;
import
com.yonde.dex.dao.service.util.DxPageUtils
;
...
@@ -28,6 +29,7 @@ import com.yonde.dex.dict.feign.DictDataFeignService;
...
@@ -28,6 +29,7 @@ import com.yonde.dex.dict.feign.DictDataFeignService;
import
com.yonde.dex.dict.service.vo.DictDataVO
;
import
com.yonde.dex.dict.service.vo.DictDataVO
;
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.common.vo.DxUserInfoVO
;
import
com.yonde.dex.user.feign.DxOrganizationFeign
;
import
com.yonde.dex.user.feign.DxUserInfoFeign
;
import
com.yonde.dex.user.feign.DxUserInfoFeign
;
import
com.yonde.dex.version.plugin.core.deleteType.IterationDeleteVO
;
import
com.yonde.dex.version.plugin.core.deleteType.IterationDeleteVO
;
import
dm.jdbc.util.StringUtil
;
import
dm.jdbc.util.StringUtil
;
...
@@ -41,6 +43,7 @@ import java.io.File;
...
@@ -41,6 +43,7 @@ import java.io.File;
import
java.io.FileInputStream
;
import
java.io.FileInputStream
;
import
java.io.IOException
;
import
java.io.IOException
;
import
java.net.URLEncoder
;
import
java.net.URLEncoder
;
import
java.time.LocalDateTime
;
import
java.util.*
;
import
java.util.*
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
...
@@ -77,6 +80,10 @@ public class ExtPlanServiceImpl<V extends ExtPlanVO> implements ExtPlanService<V
...
@@ -77,6 +80,10 @@ public class ExtPlanServiceImpl<V extends ExtPlanVO> implements ExtPlanService<V
@Autowired
@Autowired
ExtPlanRepository
<
ExtPlan
>
extPlanRepository
;
ExtPlanRepository
<
ExtPlan
>
extPlanRepository
;
@Autowired
private
ExtDistributeRecordService
distributeRecordService
;
@Autowired
@Autowired
private
DictDataFeignService
dictDataService
;
private
DictDataFeignService
dictDataService
;
...
@@ -883,6 +890,62 @@ public class ExtPlanServiceImpl<V extends ExtPlanVO> implements ExtPlanService<V
...
@@ -883,6 +890,62 @@ public class ExtPlanServiceImpl<V extends ExtPlanVO> implements ExtPlanService<V
return
modelDefinitionVOS
.
get
(
0
);
return
modelDefinitionVOS
.
get
(
0
);
}
}
@Autowired
DxOrganizationFeign
organizationFeign
;
/**
* 生成计划分发记录对象方法
*
* @param extPlanVO
*/
@Override
public
void
generatePlanDistributeRecord
(
ExtPlanVO
extPlanVO
)
{
List
<
ExtDisReocredLinkVO
>
list
=
new
ArrayList
<>();
//创建分发记录对象
ExtDistributeRecordVO
recordVO
=
new
ExtDistributeRecordVO
();
//分发类型
recordVO
.
setDistributeType
(
"planFeedback"
);
//名称
recordVO
.
setBoTitle
(
"完成计划反馈任务"
);
//分发时间
recordVO
.
setDistributTime
(
LocalDateTime
.
now
());
recordVO
.
setDistributDepart
(
null
);
//发送者
//todo wq:recordVO 中没有setSenderId和setHandlerId属性,暂时注释。
// recordVO.setSenderId(extPlanVO.getCreatorId());
//todo wq:获取用户id暂时返回null
// Long userId = this.searchUserId(extPlanVO.getPlanExecutor());
Long
userId
=
null
;
//接收者(计划执行人)
// recordVO.setHandlerId(userId);
//接收时间
recordVO
.
setReceiveTime
(
LocalDateTime
.
now
());
List
<
DxOrganizationVO
>
organizationVOS
=
this
.
searchOrgNameByUserId
(
userId
,
"002"
);
//接收单位
if
(
CollectionUtils
.
isEmpty
(
organizationVOS
))
{
recordVO
.
setReceiver
(
null
);
}
else
{
for
(
DxOrganizationVO
org
:
organizationVOS
)
{
org
.
getName
();
}
recordVO
.
setReceiver
(
organizationVOS
.
get
(
0
).
getName
());
}
//是否需回复
recordVO
.
setReplyDistribute
(
"是"
);
recordVO
.
setReceiveType
(
"planFeedback"
);
ExtDisReocredLinkVO
disReocredLinkVO
=
new
ExtDisReocredLinkVO
();
//disReocredLinkVO.setTarget(DxObjectVo.class.cast(extPlanVO));
disReocredLinkVO
.
setTargetId
(
extPlanVO
.
getId
());
disReocredLinkVO
.
setTargetIdType
(
DxEntityUtils
.
getModelName
(
ExtPlanVO
.
class
));
disReocredLinkVO
.
setOperator
(
OperatorType
.
ADD
);
list
.
add
(
disReocredLinkVO
);
// recordVO.setSourceDisReocredLink(list);
recordVO
.
setExtDisReocredLink
(
list
);
recordVO
.
setOperator
(
OperatorType
.
ADD
);
distributeRecordService
.
saveRecursion
(
recordVO
);
}
}
}
dcs-plan-feign/src/main/java/com/yonde/dcs/plan/feign/ExtPlanServiceFeign.java
View file @
76ab24a5
...
@@ -75,4 +75,10 @@ public interface ExtPlanServiceFeign<V extends ExtPlanVO> extends ExtPlanService
...
@@ -75,4 +75,10 @@ public interface ExtPlanServiceFeign<V extends ExtPlanVO> extends ExtPlanService
@ApiOperation
(
value
=
"通过文件分类查询"
,
notes
=
"通过文件分类查询"
,
httpMethod
=
"post"
)
@ApiOperation
(
value
=
"通过文件分类查询"
,
notes
=
"通过文件分类查询"
,
httpMethod
=
"post"
)
@GetMapping
(
value
=
"/searchFileType"
)
@GetMapping
(
value
=
"/searchFileType"
)
void
searchFileType
(
@RequestParam
(
"fileType"
)
String
fileType
,
DxDocumentVO
doc
);
void
searchFileType
(
@RequestParam
(
"fileType"
)
String
fileType
,
DxDocumentVO
doc
);
@ApiOperation
(
value
=
"生成计划分发记录对象方法"
,
notes
=
"生成计划分发记录对象方法"
,
httpMethod
=
"post"
)
@GetMapping
(
value
=
"/generatePlanDistributeRecord"
)
void
generatePlanDistributeRecord
(
@RequestBody
ExtPlanVO
extPlanVO
);
}
}
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