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
32d4db3e
Commit
32d4db3e
authored
Oct 15, 2024
by
侯彦文
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
8475bf09
a48a6ab8
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
218 additions
and
143 deletions
+218
-143
SignConstants.java
...va/com/yonde/dcs/plan/common/constants/SignConstants.java
+11
-14
ExtICMPlanDocLinkVO.java
...ava/com/yonde/dcs/plan/common/vo/ExtICMPlanDocLinkVO.java
+2
-2
ExtPuchasePlanExcelVO.java
...a/com/yonde/dcs/plan/common/vo/ExtPuchasePlanExcelVO.java
+2
-15
ExtSupplierVO.java
...main/java/com/yonde/dcs/plan/common/vo/ExtSupplierVO.java
+2
-2
ExpenditureContractUtils.java
...yonde/dcs/plan/core/factory/ExpenditureContractUtils.java
+10
-26
InComeContractUtils.java
.../com/yonde/dcs/plan/core/factory/InComeContractUtils.java
+34
-34
ICMPlanExcelListenner.java
...m/yonde/dcs/plan/core/listener/ICMPlanExcelListenner.java
+2
-0
IEDPlanExcelListenner.java
...m/yonde/dcs/plan/core/listener/IEDPlanExcelListenner.java
+88
-18
PurchasePlanExcelReadListenner.java
...cs/plan/core/listener/PurchasePlanExcelReadListenner.java
+7
-0
ExtIEDPlanServiceImpl.java
...nde/dcs/plan/core/service/impl/ExtIEDPlanServiceImpl.java
+5
-1
ExtSupplierManageServiceImpl.java
.../plan/core/service/impl/ExtSupplierManageServiceImpl.java
+34
-31
UserUtils.java
...src/main/java/com/yonde/dcs/plan/core/util/UserUtils.java
+21
-0
No files found.
dcs-plan-common/src/main/java/com/yonde/dcs/plan/common/constants/SignConstants.java
View file @
32d4db3e
...
...
@@ -13,16 +13,16 @@ import java.util.List;
public
final
class
SignConstants
{
//签名取值
public
static
final
String
SIGN_KEY_
PREPARED
=
"编制"
;
public
static
final
String
SIGN_KEY_
TSSH
=
"同室审核
"
;
public
static
final
String
SIGN_KEY_
FXTZSSH
=
"分系统总师审核
"
;
public
static
final
String
SIGN_KEY_
GY
=
"工艺
"
;
public
static
final
String
SIGN_KEY_
QF
=
"签发
"
;
public
static
final
String
SIGN_KEY_
ZTSSH
=
"总体室审核
"
;
public
static
final
String
SIGN_KEY_
APPROVED
=
"批准
"
;
public
static
final
String
SIGN_KEY_
STANDARD
=
"标准化
"
;
public
static
final
String
SIGN_KEY_
ZTS
=
"总体室
"
;
public
static
final
String
SIGN_KEY_ZTSQS
=
"总体室签审"
;
public
static
final
String
SIGN_KEY_
BZ
=
"编制"
;
public
static
final
String
SIGN_KEY_
SJX_IN_COME_CONTRACT
=
"设计项
"
;
public
static
final
String
SIGN_KEY_
ZTS_IN_COME_CONTRACT
=
"总体室
"
;
public
static
final
String
SIGN_KEY_
ZBB_IN_COME_CONTRACT
=
"质保部
"
;
public
static
final
String
SIGN_KEY_
BMB_IN_COME_CONTRACT
=
"保密办
"
;
public
static
final
String
SIGN_KEY_
XMBU_IN_COME_CONTRACT
=
"项目部
"
;
public
static
final
String
SIGN_KEY_
XMBAN_IN_COME_CONTRACT
=
"项目办
"
;
public
static
final
String
SIGN_KEY_
CBBM_IN_COME_CONTRACT
=
"承办部门
"
;
public
static
final
String
SIGN_KEY_
XMZGYLD_IN_COME_CONTRACT
=
"项目主管院领导
"
;
public
static
final
String
SIGN_KEY_TZSH
=
"提资审核"
;
public
static
final
String
SIGN_KEY_SH
=
"审核"
;
public
static
final
String
SIGN_KEY_CLJD
=
"编制不符合项处理单处理决定任务"
;
...
...
@@ -70,10 +70,7 @@ public final class SignConstants {
* 定义流程判断节点常量
*/
public
final
static
List
WfResultList
=
Arrays
.
asList
(
"通过"
,
"同意"
,
"提交签审"
,
"提交审阅"
,
"提交"
,
"提交提资审阅"
,
"不需要总体室会签"
,
"外协采购单位(过工程部)"
,
"设计协同单位及其他"
);
/**
* 定义总体室签审节点名称
*/
public
final
static
List
ZTSSignTaskList
=
Arrays
.
asList
(
SIGN_KEY_ZTS
,
SIGN_ZTS
,
SIGN_KEY_ZTSJKSC
);
/**
* 定义流程路由常量
*/
...
...
dcs-plan-common/src/main/java/com/yonde/dcs/plan/common/vo/ExtICMPlanDocLinkVO.java
View file @
32d4db3e
...
...
@@ -50,8 +50,8 @@ import com.yonde.dex.basedata.entity.users.DxUserVO;
@EqualsAndHashCode
(
callSuper
=
true
)
@Data
@ToString
(
callSuper
=
true
)
@DexTypeVersionProp
(
propName
=
"target"
,
join
=
@VersionProperty
(
curVersion
=
VersionRelationType
.
NONE
,
refVersion
=
VersionRelationType
.
VERS
ION
))
@DexTypeVersionProp
(
propName
=
"source"
,
join
=
@VersionProperty
(
curVersion
=
VersionRelationType
.
NONE
,
refVersion
=
VersionRelationType
.
VERS
ION
))
@DexTypeVersionProp
(
propName
=
"target"
,
join
=
@VersionProperty
(
curVersion
=
VersionRelationType
.
NONE
,
refVersion
=
VersionRelationType
.
ITERAT
ION
))
@DexTypeVersionProp
(
propName
=
"source"
,
join
=
@VersionProperty
(
curVersion
=
VersionRelationType
.
NONE
,
refVersion
=
VersionRelationType
.
ITERAT
ION
))
public
class
ExtICMPlanDocLinkVO
extends
IdOnlyVO
implements
IdVO
,
DxLinkDataVOHolder
<
ExtICMExternalInterfacePlanVO
,
DxDocumentVO
>
,
DxLogicDeleteVOHolder
{
public
static
final
String
DX_ID_EMBEDDABLE_PROP_NAME
=
"dxIdEmbeddable"
;
...
...
dcs-plan-common/src/main/java/com/yonde/dcs/plan/common/vo/ExtPuchasePlanExcelVO.java
View file @
32d4db3e
...
...
@@ -91,7 +91,7 @@ public class ExtPuchasePlanExcelVO {
/**
* 计划编码
*/
@ExcelProperty
(
value
=
{
"采购计划"
,
"计划编
码
*"
},
index
=
8
)
@ExcelProperty
(
value
=
{
"采购计划"
,
"计划编
号
*"
},
index
=
8
)
@ColumnWidth
(
20
)
private
String
planCode
;
...
...
@@ -99,23 +99,10 @@ public class ExtPuchasePlanExcelVO {
/**
* 备注
*/
@ExcelProperty
(
value
=
{
"采购计划"
,
"备注
*
"
},
index
=
9
)
@ExcelProperty
(
value
=
{
"采购计划"
,
"备注"
},
index
=
9
)
@ColumnWidth
(
20
)
private
String
note
;
public
static
void
main
(
String
[]
args
)
{
List
<
ExtPuchasePlanExcelVO
>
list
=
new
ArrayList
<>();
for
(
int
i
=
0
;
i
<=
1
;
i
++){
ExtPuchasePlanExcelVO
extPuchasePlanExcelVO
=
new
ExtPuchasePlanExcelVO
();
extPuchasePlanExcelVO
.
setNote
(
"测试"
+
i
);
list
.
add
(
extPuchasePlanExcelVO
);
}
EasyExcel
.
write
(
"F:\\yangyi\\项目\\清华核研院\\核研院设计文档及原型\\采购计划导入模板333.xlsx"
,
ExtPuchasePlanExcelVO
.
class
)
.
sheet
(
"采购计划"
).
doWrite
(
list
);
}
}
dcs-plan-common/src/main/java/com/yonde/dcs/plan/common/vo/ExtSupplierVO.java
View file @
32d4db3e
...
...
@@ -64,7 +64,7 @@ public class ExtSupplierVO implements Serializable {
/**
* 资质内容
*/
@ExcelProperty
(
"资质内容(
承制资格
证书)"
)
@ExcelProperty
(
"资质内容(
质量体系
证书)"
)
private
String
qscQualificationsContent
;
/**
...
...
@@ -82,7 +82,7 @@ public class ExtSupplierVO implements Serializable {
/**
* 资质内容
*/
@ExcelProperty
(
"资质内容(
质量体系
证书)"
)
@ExcelProperty
(
"资质内容(
承制资格
证书)"
)
private
String
cqmQualificationsContent
;
/**
...
...
dcs-plan-core/src/main/java/com/yonde/dcs/plan/core/factory/ExpenditureContractUtils.java
View file @
32d4db3e
...
...
@@ -9,6 +9,7 @@ import com.yonde.dcs.plan.core.service.ExtExpenditureContractService;
import
com.yonde.dcs.plan.core.word.ImportWordService
;
import
com.yonde.dex.wfc.common.vo.DxWfProcessInfoVO
;
import
com.yonde.dex.wfc.common.vo.DxWfProcessTaskVO
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
import
org.springframework.util.CollectionUtils
;
...
...
@@ -22,6 +23,7 @@ import java.util.List;
* @createTime 2022/02/22 14:35:00
*/
@Component
@Slf4j
public
class
ExpenditureContractUtils
{
@Autowired
...
...
@@ -29,6 +31,7 @@ public class ExpenditureContractUtils {
@Autowired
private
ImportWordService
importWordService
;
/**
* 填充评审会议资料数据
*
...
...
@@ -48,24 +51,12 @@ public class ExpenditureContractUtils {
String designPhase = Objects.isNull(dynamicAttrs.get("designPhase")) ? "" : (String) dynamicAttrs.get("designPhase");*/
JSONObject
jsonObject
=
(
JSONObject
)
JSONObject
.
toJSON
(
expenditureContractVO
);
jsonObject
.
put
(
"agree"
,
"☑"
);
jsonObject
.
put
(
"reject"
,
"□"
);
//项目代号
/*String projectCode = ObjectUtils.isEmpty(v.getDxDocumentExpand().getProjectCode()) ? "" : v.getDxDocumentExpand().getProjectCode();
jsonObject.put("projectCode", extDocService.searchDictDataByDictCode(Constants.PROJECT_CODE, projectCode));
jsonObject.put("projectCode", projectCode);*/
//合同名称
//合同乙方
//合同编号
//合同金额
//合同密级
//合同乙方保密资质等级
//合同类型
//学校/院归口管理部门
//合同成果形式
//成果交付地点(样机存放地方)
//起止时间
//承办部门
//经办人
//
//页数
//jsonObject.put("pages",v.getDxDocumentExpand().getAttachPages());
...
...
@@ -73,19 +64,12 @@ public class ExpenditureContractUtils {
List
<
DxWfProcessTaskVO
>
activities
=
wfProcessInfoVO
.
getHistoryInfo
();
if
(!
CollectionUtils
.
isEmpty
(
activities
))
{
//写入签名数据
jsonObject
.
put
(
"bz_photo"
,
extExpenditureContractService
.
getSignImage
(
activities
,
SignConstants
.
SIGN_KEY_PREPARED
));
jsonObject
.
put
(
"bz_date"
,
extExpenditureContractService
.
getEndDate
(
activities
,
SignConstants
.
SIGN_KEY_PREPARED
));
jsonObject
.
put
(
"bz_comments"
,
extExpenditureContractService
.
getComments
(
activities
,
SignConstants
.
SIGN_KEY_PREPARED
));
jsonObject
.
put
(
"sh_photo"
,
extExpenditureContractService
.
getSignImage
(
activities
,
SignConstants
.
SIGN_KEY_SH
));
jsonObject
.
put
(
"sh_date"
,
extExpenditureContractService
.
getEndDate
(
activities
,
SignConstants
.
SIGN_KEY_SH
));
//总体室审核
jsonObject
.
put
(
"zts_photo"
,
extExpenditureContractService
.
getSignImage
(
activities
,
SignConstants
.
SIGN_KEY_ZTSSH
));
jsonObject
.
put
(
"zts_date"
,
extExpenditureContractService
.
getEndDate
(
activities
,
SignConstants
.
SIGN_KEY_ZTSSH
));
jsonObject
.
put
(
"zts_comments"
,
extExpenditureContractService
.
getComments
(
activities
,
SignConstants
.
SIGN_KEY_PREPARED
));
jsonObject
.
put
(
"pz_photo"
,
extExpenditureContractService
.
getSignImage
(
activities
,
SignConstants
.
SIGN_KEY_APPROVED
));
jsonObject
.
put
(
"pz_date"
,
extExpenditureContractService
.
getEndDate
(
activities
,
SignConstants
.
SIGN_KEY_APPROVED
));
jsonObject
.
put
(
"pz_comments"
,
extExpenditureContractService
.
getComments
(
activities
,
SignConstants
.
SIGN_KEY_PREPARED
));
jsonObject
.
put
(
"bz_photo"
,
extExpenditureContractService
.
getSignImage
(
activities
,
SignConstants
.
SIGN_KEY_BZ
));
jsonObject
.
put
(
"bz_date"
,
extExpenditureContractService
.
getEndDate
(
activities
,
SignConstants
.
SIGN_KEY_BZ
));
jsonObject
.
put
(
"bz_comments"
,
extExpenditureContractService
.
getComments
(
activities
,
SignConstants
.
SIGN_KEY_BZ
));
}
log
.
info
(
"ExpenditureContractUtils.settingDocData.jsonObject:{}"
,
jsonObject
.
toString
());
//模板名称
importWordService
.
getWordAllTable
(
jsonObject
,
path
+
file
+
".docx"
,
outFilePath
+
"outFile.docx"
);
return
jsonObject
;
...
...
dcs-plan-core/src/main/java/com/yonde/dcs/plan/core/factory/InComeContractUtils.java
View file @
32d4db3e
...
...
@@ -11,6 +11,7 @@ import com.yonde.dcs.plan.core.service.ExtExpenditureContractService;
import
com.yonde.dcs.plan.core.word.ImportWordService
;
import
com.yonde.dex.wfc.common.vo.DxWfProcessInfoVO
;
import
com.yonde.dex.wfc.common.vo.DxWfProcessTaskVO
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
import
org.springframework.util.CollectionUtils
;
...
...
@@ -27,6 +28,7 @@ import java.util.Objects;
* @createTime 2022/02/22 14:35:00
*/
@Component
@Slf4j
public
class
InComeContractUtils
{
@Autowired
...
...
@@ -47,47 +49,45 @@ public class InComeContractUtils {
+
"\\"
+
inComeContractVO
.
getNumber
()
+
"\\"
;
//生成特定的文档目录,保存生成的word文件
FileUtil
.
mkdir
(
outFilePath
);
//获取动态属性
/*Map<String, Object> dynamicAttrs = expenditureContractVO.getDynamicAttrs();
String content = Objects.isNull(dynamicAttrs.get("content")) ? "" : (String) dynamicAttrs.get("content");
String designPhase = Objects.isNull(dynamicAttrs.get("designPhase")) ? "" : (String) dynamicAttrs.get("designPhase");*/
JSONObject
jsonObject
=
(
JSONObject
)
JSONObject
.
toJSON
(
inComeContractVO
);
//项目代号
/*String projectCode = ObjectUtils.isEmpty(v.getDxDocumentExpand().getProjectCode()) ? "" : v.getDxDocumentExpand().getProjectCode();
jsonObject.put("projectCode", extDocService.searchDictDataByDictCode(Constants.PROJECT_CODE, projectCode));
jsonObject.put("projectCode", projectCode);*/
//合同名称
//合同乙方
//合同编号
//合同金额
//合同密级
//合同乙方保密资质等级
//合同类型
//学校/院归口管理部门
//合同成果形式
//成果交付地点(样机存放地方)
//起止时间
//承办部门
//经办人
//
//页数
//jsonObject.put("pages",v.getDxDocumentExpand().getAttachPages());
//获取参与者
List
<
DxWfProcessTaskVO
>
activities
=
wfProcessInfoVO
.
getHistoryInfo
();
if
(!
CollectionUtils
.
isEmpty
(
activities
))
{
//写入签名数据
jsonObject
.
put
(
"bz_photo"
,
extExpenditureContractService
.
getSignImage
(
activities
,
SignConstants
.
SIGN_KEY_PREPARED
));
jsonObject
.
put
(
"bz_date"
,
extExpenditureContractService
.
getEndDate
(
activities
,
SignConstants
.
SIGN_KEY_PREPARED
));
jsonObject
.
put
(
"sh_photo"
,
extExpenditureContractService
.
getSignImage
(
activities
,
SignConstants
.
SIGN_KEY_SH
));
jsonObject
.
put
(
"sh_date"
,
extExpenditureContractService
.
getEndDate
(
activities
,
SignConstants
.
SIGN_KEY_SH
));
//总体室审核
jsonObject
.
put
(
"zts_photo"
,
extExpenditureContractService
.
getSignImage
(
activities
,
SignConstants
.
SIGN_KEY_ZTSSH
));
jsonObject
.
put
(
"zts_date"
,
extExpenditureContractService
.
getEndDate
(
activities
,
SignConstants
.
SIGN_KEY_ZTSSH
));
jsonObject
.
put
(
"pz_photo"
,
extExpenditureContractService
.
getSignImage
(
activities
,
SignConstants
.
SIGN_KEY_APPROVED
));
jsonObject
.
put
(
"pz_date"
,
extExpenditureContractService
.
getEndDate
(
activities
,
SignConstants
.
SIGN_KEY_APPROVED
));
jsonObject
.
put
(
"sjxfzr_photo"
,
extExpenditureContractService
.
getSignImage
(
activities
,
SignConstants
.
SIGN_KEY_SJX_IN_COME_CONTRACT
));
jsonObject
.
put
(
"sjxfzr_date"
,
extExpenditureContractService
.
getEndDate
(
activities
,
SignConstants
.
SIGN_KEY_SJX_IN_COME_CONTRACT
));
jsonObject
.
put
(
"sjxfzr_comments"
,
extExpenditureContractService
.
getComments
(
activities
,
SignConstants
.
SIGN_KEY_SJX_IN_COME_CONTRACT
));
jsonObject
.
put
(
"ztsfzr_photo"
,
extExpenditureContractService
.
getSignImage
(
activities
,
SignConstants
.
SIGN_KEY_ZTS_IN_COME_CONTRACT
));
jsonObject
.
put
(
"ztsfzr_date"
,
extExpenditureContractService
.
getEndDate
(
activities
,
SignConstants
.
SIGN_KEY_ZTS_IN_COME_CONTRACT
));
jsonObject
.
put
(
"ztsfzr_comments"
,
extExpenditureContractService
.
getComments
(
activities
,
SignConstants
.
SIGN_KEY_ZTS_IN_COME_CONTRACT
));
jsonObject
.
put
(
"zbbfzr_photo"
,
extExpenditureContractService
.
getSignImage
(
activities
,
SignConstants
.
SIGN_KEY_ZBB_IN_COME_CONTRACT
));
jsonObject
.
put
(
"zbbfzr_date"
,
extExpenditureContractService
.
getEndDate
(
activities
,
SignConstants
.
SIGN_KEY_ZBB_IN_COME_CONTRACT
));
jsonObject
.
put
(
"zbbfzr_comments"
,
extExpenditureContractService
.
getComments
(
activities
,
SignConstants
.
SIGN_KEY_ZBB_IN_COME_CONTRACT
));
jsonObject
.
put
(
"bmbfzr_photo"
,
extExpenditureContractService
.
getSignImage
(
activities
,
SignConstants
.
SIGN_KEY_BMB_IN_COME_CONTRACT
));
jsonObject
.
put
(
"bmbfzr_date"
,
extExpenditureContractService
.
getEndDate
(
activities
,
SignConstants
.
SIGN_KEY_BMB_IN_COME_CONTRACT
));
jsonObject
.
put
(
"bmbfzr_comments"
,
extExpenditureContractService
.
getComments
(
activities
,
SignConstants
.
SIGN_KEY_BMB_IN_COME_CONTRACT
));
jsonObject
.
put
(
"xmbufzr_photo"
,
extExpenditureContractService
.
getSignImage
(
activities
,
SignConstants
.
SIGN_KEY_XMBU_IN_COME_CONTRACT
));
jsonObject
.
put
(
"xmbufzr_date"
,
extExpenditureContractService
.
getEndDate
(
activities
,
SignConstants
.
SIGN_KEY_XMBU_IN_COME_CONTRACT
));
jsonObject
.
put
(
"xmbufzr_comments"
,
extExpenditureContractService
.
getComments
(
activities
,
SignConstants
.
SIGN_KEY_XMBU_IN_COME_CONTRACT
));
jsonObject
.
put
(
"xmbanfzr_photo"
,
extExpenditureContractService
.
getSignImage
(
activities
,
SignConstants
.
SIGN_KEY_XMBAN_IN_COME_CONTRACT
));
jsonObject
.
put
(
"xmbanfzr_date"
,
extExpenditureContractService
.
getEndDate
(
activities
,
SignConstants
.
SIGN_KEY_XMBAN_IN_COME_CONTRACT
));
jsonObject
.
put
(
"xmbanfzr_comments"
,
extExpenditureContractService
.
getComments
(
activities
,
SignConstants
.
SIGN_KEY_XMBAN_IN_COME_CONTRACT
));
jsonObject
.
put
(
"cbbmfzr_photo"
,
extExpenditureContractService
.
getSignImage
(
activities
,
SignConstants
.
SIGN_KEY_CBBM_IN_COME_CONTRACT
));
jsonObject
.
put
(
"cbbmfzr_date"
,
extExpenditureContractService
.
getEndDate
(
activities
,
SignConstants
.
SIGN_KEY_CBBM_IN_COME_CONTRACT
));
jsonObject
.
put
(
"cbbmfzr_comments"
,
extExpenditureContractService
.
getComments
(
activities
,
SignConstants
.
SIGN_KEY_CBBM_IN_COME_CONTRACT
));
jsonObject
.
put
(
"xmzgyld_photo"
,
extExpenditureContractService
.
getSignImage
(
activities
,
SignConstants
.
SIGN_KEY_XMZGYLD_IN_COME_CONTRACT
));
jsonObject
.
put
(
"xmzgyld_date"
,
extExpenditureContractService
.
getEndDate
(
activities
,
SignConstants
.
SIGN_KEY_XMZGYLD_IN_COME_CONTRACT
));
jsonObject
.
put
(
"xmzgyld_comments"
,
extExpenditureContractService
.
getComments
(
activities
,
SignConstants
.
SIGN_KEY_XMZGYLD_IN_COME_CONTRACT
));
}
log
.
info
(
"InComeContractUtils.settingDocData.jsonObject:{}"
,
jsonObject
.
toString
());
//模板名称
importWordService
.
getWordAllTable
(
jsonObject
,
path
+
file
+
".docx"
,
outFilePath
+
"outFile.docx"
);
return
jsonObject
;
...
...
dcs-plan-core/src/main/java/com/yonde/dcs/plan/core/listener/ICMPlanExcelListenner.java
View file @
32d4db3e
...
...
@@ -190,8 +190,10 @@ public class ICMPlanExcelListenner extends AnalysisEventListener<ExtICMPlanExcel
SearchItems
icmPlanSearch
=
new
SearchItems
();
SearchItem
numberFilter
=
new
SearchItem
(
"planNumber"
,
SearchItem
.
Operator
.
EQ
,
planNumber
,
(
Object
)
null
);
SearchItem
latestFilter
=
new
SearchItem
(
"latest"
,
SearchItem
.
Operator
.
EQ
,
true
,
(
Object
)
null
);
SearchItem
projectIdFilter
=
new
SearchItem
(
"dxContextId"
,
SearchItem
.
Operator
.
EQ
,
projectId
,
(
Object
)
null
);
icmPlanSearch
.
addItem
(
numberFilter
);
icmPlanSearch
.
addItem
(
latestFilter
);
icmPlanSearch
.
addItem
(
projectIdFilter
);
SearchQueryCondition
searchQuery
=
SearchQueryCondition
.
builder
().
searchItems
(
icmPlanSearch
).
sortItem
(
Lists
.
newArrayList
(
new
SortItem
[]{
sortByModifyTime
})).
build
();
//根据计划编码查询出最新版本的计划
DxPageImpl
<
ExtICMExternalInterfacePlanVO
>
ICMPlanPage
=
extICMExternalInterfacePlanService
.
findRecursion
(
searchQuery
);
...
...
dcs-plan-core/src/main/java/com/yonde/dcs/plan/core/listener/IEDPlanExcelListenner.java
View file @
32d4db3e
...
...
@@ -15,6 +15,7 @@ import com.yonde.dcs.plan.common.vo.ExtPuchasePlanAttributeVO;
import
com.yonde.dcs.plan.core.service.ExtIEDPlanDocLinkService
;
import
com.yonde.dcs.plan.core.service.ExtIEDPlanService
;
import
com.yonde.dcs.plan.core.util.CommonUtils
;
import
com.yonde.dcs.plan.core.util.UserUtils
;
import
com.yonde.dcs.plan.core.util.WorkFlowUtil
;
import
com.yonde.dcs.plan.entity.po.ExtIEDPlanDocLink
;
import
com.yonde.dex.basedata.data.search.SearchItem
;
...
...
@@ -25,6 +26,8 @@ import com.yonde.dex.basedata.entity.data.OperatorType;
import
com.yonde.dex.basedata.exception.DxBusinessException
;
import
com.yonde.dex.dao.service.util.ApplicationContextUtil
;
import
com.yonde.dex.dao.service.util.DxPageUtils
;
import
com.yonde.dex.user.common.vo.DxUserInfoVO
;
import
com.yonde.dex.user.feign.DxUserInfoFeign
;
import
com.yonde.dex.wfc.common.vo.DxWfProcessVO
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -47,6 +50,7 @@ public class IEDPlanExcelListenner extends AnalysisEventListener<ExtIEDPlanExcel
private
ExtIEDPlanDocLinkService
extIEDPlanDocLinkService
;
private
ExtDxDocumentServiceFeign
extDxDocumentServiceFeign
;
private
WorkFlowUtil
workFlowUtil
;
private
UserUtils
userUtils
;
/**
* 每隔100条处理下,然后清理list ,方便内存回收
*/
...
...
@@ -85,6 +89,7 @@ public class IEDPlanExcelListenner extends AnalysisEventListener<ExtIEDPlanExcel
this
.
extIEDPlanDocLinkService
=
ApplicationContextUtil
.
getBean
(
ExtIEDPlanDocLinkService
.
class
);
this
.
workFlowUtil
=
ApplicationContextUtil
.
getBean
(
WorkFlowUtil
.
class
);
this
.
extDxDocumentServiceFeign
=
ApplicationContextUtil
.
getBean
(
ExtDxDocumentServiceFeign
.
class
);
this
.
userUtils
=
ApplicationContextUtil
.
getBean
(
UserUtils
.
class
);
this
.
projectId
=
projectId
;
}
...
...
@@ -182,23 +187,8 @@ public class IEDPlanExcelListenner extends AnalysisEventListener<ExtIEDPlanExcel
StringBuffer
errorString
=
new
StringBuffer
();
//校验数据
if
(!
StringUtils
.
isEmpty
(
extIEDPlanExcelVO
.
getOperation
())
&&
!
StringUtils
.
isEmpty
(
extIEDPlanExcelVO
.
getFileNumber
()))
{
if
(!
operationList
.
contains
(
extIEDPlanExcelVO
.
getOperation
()))
{
errorString
.
append
(
"解析到数据第"
+
excelDataRow
+
"行文件编号为:"
+
extIEDPlanExcelVO
.
getFileNumber
()
+
"的操作符无法识别!!"
);
errorList
.
add
(
errorString
);
return
;
}
//文件代号不能为空
if
(
StringUtils
.
isEmpty
(
extIEDPlanExcelVO
.
getFileCode
())){
errorString
.
append
(
"解析到数据第"
+
excelDataRow
+
"行文件编号为:"
+
extIEDPlanExcelVO
.
getFileNumber
()
+
"的文件代号不能为空!!"
);
errorList
.
add
(
errorString
);
return
;
}
//管理系统编码不能为空
if
(
StringUtils
.
isEmpty
(
extIEDPlanExcelVO
.
getSystemNumber
())){
errorString
.
append
(
"解析到数据第"
+
excelDataRow
+
"行文件编号为:"
+
extIEDPlanExcelVO
.
getFileNumber
()
+
"的管理信息系统编码不能为空!!"
);
errorList
.
add
(
errorString
);
return
;
}
//校验excel必填字段是否有效
verifyExcelRequiredFields
(
extIEDPlanExcelVO
,
errorString
);
//如果是新增,查看一下数据库中是不是已经存在
if
(
Constants
.
EXCEL_ADD
.
equals
(
extIEDPlanExcelVO
.
getOperation
()))
{
//文件编码、文件代号、管理系统编码只要有一个为删除存在就不能新增。
...
...
@@ -207,7 +197,7 @@ public class IEDPlanExcelListenner extends AnalysisEventListener<ExtIEDPlanExcel
errorString
.
append
(
"解析到数据第"
+
excelDataRow
+
"行,新增IED计划的文件编号、文件代号或者管理信息系统编码已存在,不能重复添加!"
);
errorList
.
add
(
errorString
);
}
}
else
if
(
Constants
.
EXCEL_DELETE
.
equals
(
extIEDPlanExcelVO
.
getOperation
())){
//删除时校验
}
else
if
(
Constants
.
EXCEL_DELETE
.
equals
(
extIEDPlanExcelVO
.
getOperation
())){
// ExtIEDPlanVO extIEDPlanVO = getIEDPlanByFileNumberAndDeleted(extIEDPlanExcelVO.getFileNumber(),true);
// if(!ObjectUtils.isEmpty(extIEDPlanVO)){
// errorString.append("解析到数据第"+excelDataRow+"行,删除IED计划的文件编号:" + extIEDPlanExcelVO.getFileNumber() + "未查到相关数据,删除失败!");
...
...
@@ -436,4 +426,84 @@ public class IEDPlanExcelListenner extends AnalysisEventListener<ExtIEDPlanExcel
extDxDocumentServiceFeign
.
saveRecursion
(
dxDocumentVO
);
}
/**
* 校验excel必填字段
* @param extIEDPlanExcelVO
* @param errorString
*/
public
void
verifyExcelRequiredFields
(
ExtIEDPlanExcelVO
extIEDPlanExcelVO
,
StringBuffer
errorString
){
if
(!
operationList
.
contains
(
extIEDPlanExcelVO
.
getOperation
()))
{
errorString
.
append
(
"解析到数据第"
+
excelDataRow
+
"行文件编号为:"
+
extIEDPlanExcelVO
.
getFileNumber
()
+
"的操作符无法识别!!"
);
errorList
.
add
(
errorString
);
return
;
}
//文件代号不能为空
if
(
StringUtils
.
isEmpty
(
extIEDPlanExcelVO
.
getFileCode
())){
errorString
.
append
(
"解析到数据第"
+
excelDataRow
+
"行文件编号为:"
+
extIEDPlanExcelVO
.
getFileNumber
()
+
"的文件代号不能为空!!"
);
errorList
.
add
(
errorString
);
return
;
}
//管理系统编码不能为空
if
(
StringUtils
.
isEmpty
(
extIEDPlanExcelVO
.
getSystemNumber
())){
errorString
.
append
(
"解析到数据第"
+
excelDataRow
+
"行文件编号为:"
+
extIEDPlanExcelVO
.
getFileNumber
()
+
"的管理信息系统编码不能为空!!"
);
errorList
.
add
(
errorString
);
return
;
}
//文件提交时间不能为空
if
(
StringUtils
.
isEmpty
(
extIEDPlanExcelVO
.
getFileSubmitTime
())){
errorString
.
append
(
"解析到数据第"
+
excelDataRow
+
"行文件编号为:"
+
extIEDPlanExcelVO
.
getFileNumber
()
+
"的提交时间不能为空!!"
);
errorList
.
add
(
errorString
);
return
;
}
//编写者不能为空
if
(
StringUtils
.
isEmpty
(
extIEDPlanExcelVO
.
getEditor
())){
errorString
.
append
(
"解析到数据第"
+
excelDataRow
+
"行文件编号为:"
+
extIEDPlanExcelVO
.
getFileNumber
()
+
"的编写者不能为空!!"
);
errorList
.
add
(
errorString
);
return
;
}
else
{
DxUserInfoVO
dxUserInfoVO
=
userUtils
.
getUserByName
(
extIEDPlanExcelVO
.
getEditor
());
if
(
ObjectUtils
.
isEmpty
(
dxUserInfoVO
)){
errorString
.
append
(
"解析到数据第"
+
excelDataRow
+
"行文件编号为:"
+
extIEDPlanExcelVO
.
getFileNumber
()
+
"的编写者在系统中未查到!!"
);
errorList
.
add
(
errorString
);
return
;
}
else
{
extIEDPlanExcelVO
.
setEditor
(
String
.
valueOf
(
dxUserInfoVO
.
getId
()));
}
}
//审核不是空,判断该用户是否存在,存在的话,将用户id保存
if
(!
StringUtils
.
isEmpty
(
extIEDPlanExcelVO
.
getAuditor
())){
DxUserInfoVO
dxUserInfoVO
=
userUtils
.
getUserByName
(
extIEDPlanExcelVO
.
getAuditor
());
if
(
ObjectUtils
.
isEmpty
(
dxUserInfoVO
)){
errorString
.
append
(
"解析到数据第"
+
excelDataRow
+
"行文件编号为:"
+
extIEDPlanExcelVO
.
getFileNumber
()
+
"的审核者在系统中未查到!!"
);
errorList
.
add
(
errorString
);
return
;
}
else
{
extIEDPlanExcelVO
.
setAuditor
(
String
.
valueOf
(
dxUserInfoVO
.
getId
()));
}
}
//审定不是空,判断该用户是否存在,存在的话,将用户id保存
if
(!
StringUtils
.
isEmpty
(
extIEDPlanExcelVO
.
getInvestigator
())){
DxUserInfoVO
dxUserInfoVO
=
userUtils
.
getUserByName
(
extIEDPlanExcelVO
.
getInvestigator
());
if
(
ObjectUtils
.
isEmpty
(
dxUserInfoVO
)){
errorString
.
append
(
"解析到数据第"
+
excelDataRow
+
"行文件编号为:"
+
extIEDPlanExcelVO
.
getFileNumber
()
+
"的审定者在系统中未查到!!"
);
errorList
.
add
(
errorString
);
return
;
}
else
{
extIEDPlanExcelVO
.
setInvestigator
(
String
.
valueOf
(
dxUserInfoVO
.
getId
()));
}
}
//批准不是空,判断该用户是否存在,存在的话,将用户id保存
if
(!
StringUtils
.
isEmpty
(
extIEDPlanExcelVO
.
getRatifier
())){
DxUserInfoVO
dxUserInfoVO
=
userUtils
.
getUserByName
(
extIEDPlanExcelVO
.
getRatifier
());
if
(
ObjectUtils
.
isEmpty
(
dxUserInfoVO
)){
errorString
.
append
(
"解析到数据第"
+
excelDataRow
+
"行文件编号为:"
+
extIEDPlanExcelVO
.
getFileNumber
()
+
"的审定者在系统中未查到!!"
);
errorList
.
add
(
errorString
);
return
;
}
else
{
extIEDPlanExcelVO
.
setRatifier
(
String
.
valueOf
(
dxUserInfoVO
.
getId
()));
}
}
}
}
dcs-plan-core/src/main/java/com/yonde/dcs/plan/core/listener/PurchasePlanExcelReadListenner.java
View file @
32d4db3e
...
...
@@ -29,6 +29,8 @@ import org.springframework.util.ObjectUtils;
import
javax.servlet.ServletContextListener
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.concurrent.ConcurrentHashMap
;
@Component
@Slf4j
...
...
@@ -43,6 +45,11 @@ public class PurchasePlanExcelReadListenner extends AnalysisEventListener<ExtPuc
private
String
projectId
;
/**
* 密级列别
*/
private
Map
<
Integer
,
String
>
securityList
=
new
ConcurrentHashMap
();
/**
* excel数据行数
*/
...
...
dcs-plan-core/src/main/java/com/yonde/dcs/plan/core/service/impl/ExtIEDPlanServiceImpl.java
View file @
32d4db3e
...
...
@@ -74,6 +74,7 @@ public class ExtIEDPlanServiceImpl<V extends ExtIEDPlanVO> implements ExtIEDPlan
@Autowired
private
ExtIEDPlanDocLinkService
extIEDPlanDocLinkService
;
@Override
public
String
importIEDPlan
(
InputStream
inputStream
,
String
projectId
)
{
EasyExcel
.
read
(
inputStream
,
ExtIEDPlanExcelVO
.
class
,
...
...
@@ -201,6 +202,8 @@ public class ExtIEDPlanServiceImpl<V extends ExtIEDPlanVO> implements ExtIEDPlan
dynamicAttrs
.
put
(
"systemCode"
,
extIEDPlanVO
.
getSystemNumber
());
//阶段
dynamicAttrs
.
put
(
"phase"
,
extIEDPlanVO
.
getPhase
());
//编写者
dynamicAttrs
.
put
(
"editor"
,
extIEDPlanVO
.
getEditor
());
//设置动态属性
dxDocumentVO
.
setDynamicAttrs
(
dynamicAttrs
);
//设备号
...
...
@@ -208,6 +211,8 @@ public class ExtIEDPlanServiceImpl<V extends ExtIEDPlanVO> implements ExtIEDPlan
//创建时间
dxDocumentVO
.
setCreateTime
(
LocalDateTime
.
now
());
//设置扩展属性
//项目代号
//todo wq项目代号暂时还未取到
dxDocumentVO
.
setDxDocumentExpand
(
dxDocumentExpand
);
dxDocumentVO
.
setOperator
(
OperatorType
.
ADD
);
DxDocumentVO
dxDocumentVOForDB
=
extDxDocumentServiceFeign
.
saveRecursion
(
dxDocumentVO
);
...
...
@@ -259,7 +264,6 @@ public class ExtIEDPlanServiceImpl<V extends ExtIEDPlanVO> implements ExtIEDPlan
return
ApiResult
.
SUCCESS
;
}
}
dcs-plan-core/src/main/java/com/yonde/dcs/plan/core/service/impl/ExtSupplierManageServiceImpl.java
View file @
32d4db3e
...
...
@@ -159,7 +159,7 @@ public class ExtSupplierManageServiceImpl<V extends ExtSupplierManageVO> impleme
throw
new
DxBusinessException
(
"500"
,
"获取不到对象"
);
}
if
(!
extSupplierManageVO
.
getState
().
equals
(
Constants
.
RELEASE
))
{
throw
new
DxBusinessException
(
"500"
,
"该对象不是
编制
状态"
);
throw
new
DxBusinessException
(
"500"
,
"该对象不是
已发布
状态"
);
}
return
this
.
changeStatus
(
extSupplierManageVO
.
getId
(),
Constants
.
CONTEXT_DISABLE
,
true
);
}
...
...
@@ -179,7 +179,9 @@ public class ExtSupplierManageServiceImpl<V extends ExtSupplierManageVO> impleme
BeanUtils
.
copyProperties
(
extSupplierManageVO
,
extSupplierVO
);
DictDataVO
supplierType
=
supplierTypeMap
.
get
(
extSupplierManageVO
.
getSupplierType
());
extSupplierVO
.
setSupplierType
(
supplierType
.
getDictValue
());
for
(
ExtSupplierManageLinkVO
extSupplierManageLink
:
extSupplierManageVO
.
getExtSupplierManageLinks
())
{
List
<
ExtSupplierManageLinkVO
>
extSupplierManageLinks
=
extSupplierManageVO
.
getExtSupplierManageLinks
();
if
(
CollectionUtils
.
isNotEmpty
(
extSupplierManageLinks
))
{
for
(
ExtSupplierManageLinkVO
extSupplierManageLink
:
extSupplierManageLinks
)
{
ExtQualificationsVO
target
=
extSupplierManageLink
.
getTarget
();
String
qualificationsContent
=
target
.
getQualificationsContent
();
String
certificateNumber
=
target
.
getCertificateNumber
();
...
...
@@ -211,6 +213,7 @@ public class ExtSupplierManageServiceImpl<V extends ExtSupplierManageVO> impleme
break
;
}
}
}
list
.
add
(
extSupplierVO
);
}
return
list
;
...
...
dcs-plan-core/src/main/java/com/yonde/dcs/plan/core/util/UserUtils.java
0 → 100644
View file @
32d4db3e
package
com
.
yonde
.
dcs
.
plan
.
core
.
util
;
import
com.yonde.dex.user.common.vo.DxUserInfoVO
;
import
com.yonde.dex.user.feign.DxUserInfoFeign
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
/**
* 用户信息工具类
*/
@Component
public
class
UserUtils
{
@Autowired
private
DxUserInfoFeign
dxUserInfoFeign
;
public
DxUserInfoVO
getUserByName
(
String
name
){
return
dxUserInfoFeign
.
getUserByName
(
name
);
}
}
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