Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dcs-doc-expand
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-doc-expand
Commits
0482245c
Commit
0482245c
authored
Aug 05, 2024
by
xuzhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[feat][DOC]代码迁移
parent
3883847f
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
411 additions
and
32 deletions
+411
-32
uiDesigner.xml
.idea/uiDesigner.xml
+124
-0
ExtSendFormLinkRepository.java
.../yonde/dcs/core/repository/ExtSendFormLinkRepository.java
+2
-1
ExtSerialNumberRepository.java
.../yonde/dcs/core/repository/ExtSerialNumberRepository.java
+17
-0
ExtSerialNumberRepositoryShadow.java
...re/repository/shadow/ExtSerialNumberRepositoryShadow.java
+11
-0
ExtSerialNumberService.java
...va/com/yonde/dcs/core/service/ExtSerialNumberService.java
+43
-0
ExtAutoTaskServiceImpl.java
...m/yonde/dcs/core/service/impl/ExtAutoTaskServiceImpl.java
+18
-6
ExtSerialNumberServiceImpl.java
...nde/dcs/core/service/impl/ExtSerialNumberServiceImpl.java
+103
-0
ExtSerialNumberServiceShadow.java
...dcs/core/service/shadow/ExtSerialNumberServiceShadow.java
+7
-0
ExtSendFormLink.java
...rc/main/java/com/yonde/dcs/entity/po/ExtSendFormLink.java
+10
-25
ExtSerialNumber.java
...rc/main/java/com/yonde/dcs/entity/po/ExtSerialNumber.java
+76
-0
No files found.
.idea/uiDesigner.xml
0 → 100644
View file @
0482245c
<?xml version="1.0" encoding="UTF-8"?>
<project
version=
"4"
>
<component
name=
"Palette2"
>
<group
name=
"Swing"
>
<item
class=
"com.intellij.uiDesigner.HSpacer"
tooltip-text=
"Horizontal Spacer"
icon=
"/com/intellij/uiDesigner/icons/hspacer.svg"
removable=
"false"
auto-create-binding=
"false"
can-attach-label=
"false"
>
<default-constraints
vsize-policy=
"1"
hsize-policy=
"6"
anchor=
"0"
fill=
"1"
/>
</item>
<item
class=
"com.intellij.uiDesigner.VSpacer"
tooltip-text=
"Vertical Spacer"
icon=
"/com/intellij/uiDesigner/icons/vspacer.svg"
removable=
"false"
auto-create-binding=
"false"
can-attach-label=
"false"
>
<default-constraints
vsize-policy=
"6"
hsize-policy=
"1"
anchor=
"0"
fill=
"2"
/>
</item>
<item
class=
"javax.swing.JPanel"
icon=
"/com/intellij/uiDesigner/icons/panel.svg"
removable=
"false"
auto-create-binding=
"false"
can-attach-label=
"false"
>
<default-constraints
vsize-policy=
"3"
hsize-policy=
"3"
anchor=
"0"
fill=
"3"
/>
</item>
<item
class=
"javax.swing.JScrollPane"
icon=
"/com/intellij/uiDesigner/icons/scrollPane.svg"
removable=
"false"
auto-create-binding=
"false"
can-attach-label=
"true"
>
<default-constraints
vsize-policy=
"7"
hsize-policy=
"7"
anchor=
"0"
fill=
"3"
/>
</item>
<item
class=
"javax.swing.JButton"
icon=
"/com/intellij/uiDesigner/icons/button.svg"
removable=
"false"
auto-create-binding=
"true"
can-attach-label=
"false"
>
<default-constraints
vsize-policy=
"0"
hsize-policy=
"3"
anchor=
"0"
fill=
"1"
/>
<initial-values>
<property
name=
"text"
value=
"Button"
/>
</initial-values>
</item>
<item
class=
"javax.swing.JRadioButton"
icon=
"/com/intellij/uiDesigner/icons/radioButton.svg"
removable=
"false"
auto-create-binding=
"true"
can-attach-label=
"false"
>
<default-constraints
vsize-policy=
"0"
hsize-policy=
"3"
anchor=
"8"
fill=
"0"
/>
<initial-values>
<property
name=
"text"
value=
"RadioButton"
/>
</initial-values>
</item>
<item
class=
"javax.swing.JCheckBox"
icon=
"/com/intellij/uiDesigner/icons/checkBox.svg"
removable=
"false"
auto-create-binding=
"true"
can-attach-label=
"false"
>
<default-constraints
vsize-policy=
"0"
hsize-policy=
"3"
anchor=
"8"
fill=
"0"
/>
<initial-values>
<property
name=
"text"
value=
"CheckBox"
/>
</initial-values>
</item>
<item
class=
"javax.swing.JLabel"
icon=
"/com/intellij/uiDesigner/icons/label.svg"
removable=
"false"
auto-create-binding=
"false"
can-attach-label=
"false"
>
<default-constraints
vsize-policy=
"0"
hsize-policy=
"0"
anchor=
"8"
fill=
"0"
/>
<initial-values>
<property
name=
"text"
value=
"Label"
/>
</initial-values>
</item>
<item
class=
"javax.swing.JTextField"
icon=
"/com/intellij/uiDesigner/icons/textField.svg"
removable=
"false"
auto-create-binding=
"true"
can-attach-label=
"true"
>
<default-constraints
vsize-policy=
"0"
hsize-policy=
"6"
anchor=
"8"
fill=
"1"
>
<preferred-size
width=
"150"
height=
"-1"
/>
</default-constraints>
</item>
<item
class=
"javax.swing.JPasswordField"
icon=
"/com/intellij/uiDesigner/icons/passwordField.svg"
removable=
"false"
auto-create-binding=
"true"
can-attach-label=
"true"
>
<default-constraints
vsize-policy=
"0"
hsize-policy=
"6"
anchor=
"8"
fill=
"1"
>
<preferred-size
width=
"150"
height=
"-1"
/>
</default-constraints>
</item>
<item
class=
"javax.swing.JFormattedTextField"
icon=
"/com/intellij/uiDesigner/icons/formattedTextField.svg"
removable=
"false"
auto-create-binding=
"true"
can-attach-label=
"true"
>
<default-constraints
vsize-policy=
"0"
hsize-policy=
"6"
anchor=
"8"
fill=
"1"
>
<preferred-size
width=
"150"
height=
"-1"
/>
</default-constraints>
</item>
<item
class=
"javax.swing.JTextArea"
icon=
"/com/intellij/uiDesigner/icons/textArea.svg"
removable=
"false"
auto-create-binding=
"true"
can-attach-label=
"true"
>
<default-constraints
vsize-policy=
"6"
hsize-policy=
"6"
anchor=
"0"
fill=
"3"
>
<preferred-size
width=
"150"
height=
"50"
/>
</default-constraints>
</item>
<item
class=
"javax.swing.JTextPane"
icon=
"/com/intellij/uiDesigner/icons/textPane.svg"
removable=
"false"
auto-create-binding=
"true"
can-attach-label=
"true"
>
<default-constraints
vsize-policy=
"6"
hsize-policy=
"6"
anchor=
"0"
fill=
"3"
>
<preferred-size
width=
"150"
height=
"50"
/>
</default-constraints>
</item>
<item
class=
"javax.swing.JEditorPane"
icon=
"/com/intellij/uiDesigner/icons/editorPane.svg"
removable=
"false"
auto-create-binding=
"true"
can-attach-label=
"true"
>
<default-constraints
vsize-policy=
"6"
hsize-policy=
"6"
anchor=
"0"
fill=
"3"
>
<preferred-size
width=
"150"
height=
"50"
/>
</default-constraints>
</item>
<item
class=
"javax.swing.JComboBox"
icon=
"/com/intellij/uiDesigner/icons/comboBox.svg"
removable=
"false"
auto-create-binding=
"true"
can-attach-label=
"true"
>
<default-constraints
vsize-policy=
"0"
hsize-policy=
"2"
anchor=
"8"
fill=
"1"
/>
</item>
<item
class=
"javax.swing.JTable"
icon=
"/com/intellij/uiDesigner/icons/table.svg"
removable=
"false"
auto-create-binding=
"true"
can-attach-label=
"false"
>
<default-constraints
vsize-policy=
"6"
hsize-policy=
"6"
anchor=
"0"
fill=
"3"
>
<preferred-size
width=
"150"
height=
"50"
/>
</default-constraints>
</item>
<item
class=
"javax.swing.JList"
icon=
"/com/intellij/uiDesigner/icons/list.svg"
removable=
"false"
auto-create-binding=
"true"
can-attach-label=
"false"
>
<default-constraints
vsize-policy=
"6"
hsize-policy=
"2"
anchor=
"0"
fill=
"3"
>
<preferred-size
width=
"150"
height=
"50"
/>
</default-constraints>
</item>
<item
class=
"javax.swing.JTree"
icon=
"/com/intellij/uiDesigner/icons/tree.svg"
removable=
"false"
auto-create-binding=
"true"
can-attach-label=
"false"
>
<default-constraints
vsize-policy=
"6"
hsize-policy=
"6"
anchor=
"0"
fill=
"3"
>
<preferred-size
width=
"150"
height=
"50"
/>
</default-constraints>
</item>
<item
class=
"javax.swing.JTabbedPane"
icon=
"/com/intellij/uiDesigner/icons/tabbedPane.svg"
removable=
"false"
auto-create-binding=
"true"
can-attach-label=
"false"
>
<default-constraints
vsize-policy=
"3"
hsize-policy=
"3"
anchor=
"0"
fill=
"3"
>
<preferred-size
width=
"200"
height=
"200"
/>
</default-constraints>
</item>
<item
class=
"javax.swing.JSplitPane"
icon=
"/com/intellij/uiDesigner/icons/splitPane.svg"
removable=
"false"
auto-create-binding=
"false"
can-attach-label=
"false"
>
<default-constraints
vsize-policy=
"3"
hsize-policy=
"3"
anchor=
"0"
fill=
"3"
>
<preferred-size
width=
"200"
height=
"200"
/>
</default-constraints>
</item>
<item
class=
"javax.swing.JSpinner"
icon=
"/com/intellij/uiDesigner/icons/spinner.svg"
removable=
"false"
auto-create-binding=
"true"
can-attach-label=
"true"
>
<default-constraints
vsize-policy=
"0"
hsize-policy=
"6"
anchor=
"8"
fill=
"1"
/>
</item>
<item
class=
"javax.swing.JSlider"
icon=
"/com/intellij/uiDesigner/icons/slider.svg"
removable=
"false"
auto-create-binding=
"true"
can-attach-label=
"false"
>
<default-constraints
vsize-policy=
"0"
hsize-policy=
"6"
anchor=
"8"
fill=
"1"
/>
</item>
<item
class=
"javax.swing.JSeparator"
icon=
"/com/intellij/uiDesigner/icons/separator.svg"
removable=
"false"
auto-create-binding=
"false"
can-attach-label=
"false"
>
<default-constraints
vsize-policy=
"6"
hsize-policy=
"6"
anchor=
"0"
fill=
"3"
/>
</item>
<item
class=
"javax.swing.JProgressBar"
icon=
"/com/intellij/uiDesigner/icons/progressbar.svg"
removable=
"false"
auto-create-binding=
"true"
can-attach-label=
"false"
>
<default-constraints
vsize-policy=
"0"
hsize-policy=
"6"
anchor=
"0"
fill=
"1"
/>
</item>
<item
class=
"javax.swing.JToolBar"
icon=
"/com/intellij/uiDesigner/icons/toolbar.svg"
removable=
"false"
auto-create-binding=
"false"
can-attach-label=
"false"
>
<default-constraints
vsize-policy=
"0"
hsize-policy=
"6"
anchor=
"0"
fill=
"1"
>
<preferred-size
width=
"-1"
height=
"20"
/>
</default-constraints>
</item>
<item
class=
"javax.swing.JToolBar$Separator"
icon=
"/com/intellij/uiDesigner/icons/toolbarSeparator.svg"
removable=
"false"
auto-create-binding=
"false"
can-attach-label=
"false"
>
<default-constraints
vsize-policy=
"0"
hsize-policy=
"0"
anchor=
"0"
fill=
"1"
/>
</item>
<item
class=
"javax.swing.JScrollBar"
icon=
"/com/intellij/uiDesigner/icons/scrollbar.svg"
removable=
"false"
auto-create-binding=
"true"
can-attach-label=
"false"
>
<default-constraints
vsize-policy=
"6"
hsize-policy=
"0"
anchor=
"0"
fill=
"2"
/>
</item>
</group>
</component>
</project>
\ No newline at end of file
dcs-doc-expand-core/src/main/java/com/yonde/dcs/core/repository/ExtSendFormLinkRepository.java
View file @
0482245c
package
com
.
yonde
.
dcs
.
core
.
repository
;
package
com
.
yonde
.
dcs
.
core
.
repository
;
import
com.yonde.dcs.entity.po.ExtSendFormLink
;
import
com.yonde.dcs.core.repository.shadow.ExtSendFormLinkRepositoryShadow
;
import
com.yonde.dcs.core.repository.shadow.ExtSendFormLinkRepositoryShadow
;
import
com.yonde.dcs.entity.po.ExtSendFormLink
;
/**
/**
* @description: ExtSendFormLink-repository
* @description: ExtSendFormLink-repository
* @author: dexadmin
* @author: dexadmin
...
...
dcs-doc-expand-core/src/main/java/com/yonde/dcs/core/repository/ExtSerialNumberRepository.java
0 → 100644
View file @
0482245c
package
com
.
yonde
.
dcs
.
core
.
repository
;
import
com.yonde.dcs.core.repository.shadow.ExtSerialNumberRepositoryShadow
;
import
com.yonde.dcs.entity.po.ExtSerialNumber
;
/**
* @program: service
* @description: 系统流水码仓储类
* @author: dang wei
* @create: 2021-05-31 14:09
*/
public
interface
ExtSerialNumberRepository
<
P
extends
ExtSerialNumber
>
extends
ExtSerialNumberRepositoryShadow
<
P
>
{
ExtSerialNumber
findByContextIdAndOneLevCategoryAndClassName
(
Long
contextId
,
String
oneLevCategory
,
String
className
);
}
dcs-doc-expand-core/src/main/java/com/yonde/dcs/core/repository/shadow/ExtSerialNumberRepositoryShadow.java
0 → 100644
View file @
0482245c
package
com
.
yonde
.
dcs
.
core
.
repository
.
shadow
;
import
com.yonde.dcs.entity.po.ExtSerialNumber
;
import
com.yonde.dex.dao.business.repository.BaseRepository
;
import
org.springframework.data.repository.NoRepositoryBean
;
import
sun.security.x509.SerialNumber
;
@NoRepositoryBean
public
interface
ExtSerialNumberRepositoryShadow
<
P
extends
ExtSerialNumber
>
extends
BaseRepository
<
P
>{
String
BEAN_NAME
=
"extSerialNumberRepository"
;
}
dcs-doc-expand-core/src/main/java/com/yonde/dcs/core/service/ExtSerialNumberService.java
0 → 100644
View file @
0482245c
package
com
.
yonde
.
dcs
.
core
.
service
;
import
com.yonde.dcs.common.vo.ExtSerialNumberVO
;
import
com.yonde.dcs.core.service.shadow.ExtSerialNumberServiceShadow
;
import
com.yonde.dcs.document.common.entity.vo.DxDocumentVO
;
import
com.yonde.dcs.entity.po.ExtSerialNumber
;
import
sun.security.x509.SerialNumber
;
/**
* @program: service
* @description: 系统流水码服务接口
* @author: dang wei
* @create: 2021-05-31 14:11
*/
public
interface
ExtSerialNumberService
<
V
extends
ExtSerialNumberVO
>
extends
ExtSerialNumberServiceShadow
<
V
>
{
/**
* 根据条件查询系统流水码最大值
*
* @param contextId
* @param contextIdType
* @param className
* @return
*/
ExtSerialNumber
findSerialNumber
(
Long
contextId
,
String
contextIdType
,
String
className
);
/**
* 保存系统流水码
*
* @param serialNumber
* @return
*/
ExtSerialNumber
save
(
ExtSerialNumber
serialNumber
);
/**
* 生成新的编码规则
*
* @param documentVO
* @return
*/
String
generateEncode
(
DxDocumentVO
documentVO
);
}
dcs-doc-expand-core/src/main/java/com/yonde/dcs/core/service/impl/ExtAutoTaskServiceImpl.java
View file @
0482245c
...
@@ -5,7 +5,19 @@ import cn.hutool.core.convert.Convert;
...
@@ -5,7 +5,19 @@ import cn.hutool.core.convert.Convert;
import
cn.hutool.core.io.FileUtil
;
import
cn.hutool.core.io.FileUtil
;
import
cn.hutool.extra.spring.SpringUtil
;
import
cn.hutool.extra.spring.SpringUtil
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.yonde.dcs.core.service.ExtAutoTaskService
;
import
com.yonde.dcs.common.vo.*
;
import
com.yonde.dcs.core.constants.Constants
;
import
com.yonde.dcs.core.events.DocBeforeCreateEvent
;
import
com.yonde.dcs.core.events.ProcessDataUtils
;
import
com.yonde.dcs.core.factory.NCRSCUtils
;
import
com.yonde.dcs.core.factory.TechnicalFileUtils
;
import
com.yonde.dcs.core.service.*
;
import
com.yonde.dcs.core.util.ExtDocUtil
;
import
com.yonde.dcs.core.util.FileUtils
;
import
com.yonde.dcs.core.util.WorkFlowUtil
;
import
com.yonde.dcs.core.word.ImportWordService
;
import
com.yonde.dcs.document.common.entity.vo.DxDocumentVO
;
import
com.yonde.dcs.document.core.service.DocumentService
;
import
com.yonde.dcs.plan.common.vo.ExtPlanDocLinkVO
;
import
com.yonde.dcs.plan.common.vo.ExtPlanDocLinkVO
;
import
com.yonde.dcs.plan.common.vo.ExtPlanVO
;
import
com.yonde.dcs.plan.common.vo.ExtPlanVO
;
import
com.yonde.dcs.plan.feign.ExtDistributeRecordServiceFeign
;
import
com.yonde.dcs.plan.feign.ExtDistributeRecordServiceFeign
;
...
@@ -62,9 +74,9 @@ import java.util.*;
...
@@ -62,9 +74,9 @@ import java.util.*;
@Service
@Service
@Slf4j
@Slf4j
public
class
ExtAutoTaskServiceImpl
implements
ExtAutoTaskService
{
public
class
ExtAutoTaskServiceImpl
implements
ExtAutoTaskService
{
@Qualifier
(
"d
xD
ocumentServiceImpl"
)
@Qualifier
(
"documentServiceImpl"
)
@Autowired
@Autowired
private
D
xD
ocumentService
documentService
;
private
DocumentService
documentService
;
@Autowired
@Autowired
private
ExtObsoleteDocLinkService
obsoleteDocLinkService
;
private
ExtObsoleteDocLinkService
obsoleteDocLinkService
;
@Autowired
@Autowired
...
@@ -176,7 +188,7 @@ public class ExtAutoTaskServiceImpl implements ExtAutoTaskService {
...
@@ -176,7 +188,7 @@ public class ExtAutoTaskServiceImpl implements ExtAutoTaskService {
// 需支持专家评审意见不驱动文件升版,仅记录专家评审意见;
// 需支持专家评审意见不驱动文件升版,仅记录专家评审意见;
if
(
Constants
.
PBULISHED
.
equals
(
state
))
{
if
(
Constants
.
PBULISHED
.
equals
(
state
))
{
//判断是否评审会资料
//判断是否评审会资料
if
(
Constants
.
METTING_MATERIALS
.
equals
(
documentVO
.
getTwoLevCategory
()))
{
if
(
Constants
.
METTING_MATERIALS
.
equals
(
documentVO
.
get
DxDocumentExpand
().
get
TwoLevCategory
()))
{
//展开sourceExtReviewDocComLink
//展开sourceExtReviewDocComLink
List
<
ExtReviewDocComLinkVO
>
reviewDocComLinkVOS
=
this
.
searchSourceExtReviewDocComLink
(
documentVO
.
getVersionId
());
List
<
ExtReviewDocComLinkVO
>
reviewDocComLinkVOS
=
this
.
searchSourceExtReviewDocComLink
(
documentVO
.
getVersionId
());
if
(!
CollectionUtils
.
isEmpty
(
reviewDocComLinkVOS
))
{
if
(!
CollectionUtils
.
isEmpty
(
reviewDocComLinkVOS
))
{
...
@@ -1009,7 +1021,7 @@ public class ExtAutoTaskServiceImpl implements ExtAutoTaskService {
...
@@ -1009,7 +1021,7 @@ public class ExtAutoTaskServiceImpl implements ExtAutoTaskService {
*/
*/
@Override
@Override
public
void
checkLockerUtil
(
DxDocumentVO
documentVO
)
{
public
void
checkLockerUtil
(
DxDocumentVO
documentVO
)
{
if
((
Constants
.
TECHNICAL_FILE
.
equals
(
documentVO
.
getOneLevCategory
()))
&&
(
Constants
.
DESIGN_ATLAS
.
equals
(
documentVO
.
getSubTypeName
())
||
Constants
.
INSTALL_ATLAS
.
equals
(
documentVO
.
getSubTypeName
())))
{
if
((
Constants
.
TECHNICAL_FILE
.
equals
(
documentVO
.
get
DxDocumentExpand
().
get
OneLevCategory
()))
&&
(
Constants
.
DESIGN_ATLAS
.
equals
(
documentVO
.
getSubTypeName
())
||
Constants
.
INSTALL_ATLAS
.
equals
(
documentVO
.
getSubTypeName
())))
{
//校验图册检出状态
//校验图册检出状态
if
(
Objects
.
nonNull
(
documentVO
.
getLocker
()))
{
if
(
Objects
.
nonNull
(
documentVO
.
getLocker
()))
{
throw
new
DxBusinessException
(
"-1"
,
"图册已被检出,编号:"
+
documentVO
.
getNumber
());
throw
new
DxBusinessException
(
"-1"
,
"图册已被检出,编号:"
+
documentVO
.
getNumber
());
...
@@ -1031,7 +1043,7 @@ public class ExtAutoTaskServiceImpl implements ExtAutoTaskService {
...
@@ -1031,7 +1043,7 @@ public class ExtAutoTaskServiceImpl implements ExtAutoTaskService {
*/
*/
@Override
@Override
public
void
generateQHTechDoc
(
DxDocumentVO
documentVO
,
Map
<
String
,
Object
>
wfTaskContext
)
{
public
void
generateQHTechDoc
(
DxDocumentVO
documentVO
,
Map
<
String
,
Object
>
wfTaskContext
)
{
if
((
Constants
.
TECHNICAL_FILE
.
equals
(
documentVO
.
getOneLevCategory
())))
{
if
((
Constants
.
TECHNICAL_FILE
.
equals
(
documentVO
.
get
DxDocumentExpand
().
get
OneLevCategory
())))
{
//TODO: 2024/7/31 4.1 不存在这个方法getWfProcessInst
//TODO: 2024/7/31 4.1 不存在这个方法getWfProcessInst
// DxWfProcessVO wfProcessInstVO = workFlowUtil.getWfProcessInst(documentVO);
// DxWfProcessVO wfProcessInstVO = workFlowUtil.getWfProcessInst(documentVO);
// TODO: 2024/7/31 4.1 不存在这个方法getProcessInstDetailById
// TODO: 2024/7/31 4.1 不存在这个方法getProcessInstDetailById
...
...
dcs-doc-expand-core/src/main/java/com/yonde/dcs/core/service/impl/ExtSerialNumberServiceImpl.java
0 → 100644
View file @
0482245c
package
com
.
yonde
.
dcs
.
core
.
service
.
impl
;
import
cn.hutool.core.util.ObjectUtil
;
import
com.yonde.dcs.common.vo.ExtSerialNumberVO
;
import
com.yonde.dcs.core.repository.ExtSerialNumberRepository
;
import
com.yonde.dcs.core.service.ExtSerialNumberService
;
import
com.yonde.dcs.document.common.entity.vo.DxDocumentVO
;
import
com.yonde.dcs.entity.po.ExtSerialNumber
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
sun.security.x509.SerialNumber
;
import
java.text.SimpleDateFormat
;
import
java.util.Date
;
/**
* @program: service
* @description: 系统流水码服务接口实现类
* @author: dang wei
* @create: 2021-05-31 14:25
*/
@Service
public
class
ExtSerialNumberServiceImpl
<
V
extends
ExtSerialNumberVO
>
implements
ExtSerialNumberService
<
V
>
{
public
static
final
String
TECHNICAL_FILE
=
"TechnicalFile"
;
public
static
final
String
TECHNICAL_DOC
=
"TechnicalDoc"
;
public
static
final
String
QAP_DOC
=
"QAPDoc"
;
public
static
final
String
GSTZ
=
"GSTZ"
;
public
static
final
String
GSTZ2
=
"GSTZ2"
;
@Autowired
ExtSerialNumberRepository
<
ExtSerialNumber
>
serialNumberRepository
;
/**
* 根据条件查询系统流水码最大值
*
* @param contextId
* @param oneLevCategory
* @param className
* @return
*/
@Override
public
ExtSerialNumber
findSerialNumber
(
Long
contextId
,
String
oneLevCategory
,
String
className
)
{
return
serialNumberRepository
.
findByContextIdAndOneLevCategoryAndClassName
(
contextId
,
oneLevCategory
,
className
);
}
/**
* 保存系统流水码
*
* @param serialNumber
* @return
*/
@Override
public
ExtSerialNumber
save
(
ExtSerialNumber
serialNumber
)
{
return
(
ExtSerialNumber
)
serialNumberRepository
.
save
(
serialNumber
);
}
@Override
public
String
generateEncode
(
DxDocumentVO
documentVO
)
{
//根据文档的一级分类生成编码(技术文件:4位单据类型(GSTZ)-4位年度号-3位流水号 质保类、技术文档类:GSTZ2-4位年度号-3位流水号)
String
oneLevCategory
=
documentVO
.
getDxDocumentExpand
().
getOneLevCategory
();
String
datetimeString
=
new
SimpleDateFormat
(
"yyyy"
).
format
(
new
Date
());
//文档阶段(动态属性)
ExtSerialNumber
serialNumber
=
this
.
findSerialNumber
(
documentVO
.
getDxContextId
(),
documentVO
.
getDxDocumentExpand
().
getOneLevCategory
(),
documentVO
.
getDxClassname
());
//流水码3位整数,自动用0补齐(默认从1开始)
Long
serialNur
=
1L
;
if
(
ObjectUtil
.
isNotNull
(
serialNumber
))
{
//流水码最大值
serialNur
=
serialNumber
.
getMaxNumber
()
+
1
;
}
else
{
//新增系统流水码信息
serialNumber
=
new
ExtSerialNumber
();
serialNumber
.
setContextId
(
documentVO
.
getDxContextId
());
serialNumber
.
setOneLevCategory
(
documentVO
.
getDxDocumentExpand
().
getOneLevCategory
());
serialNumber
.
setClassName
(
documentVO
.
getDxClassname
());
serialNumber
.
setSubTypeName
(
documentVO
.
getSubTypeName
());
}
//更新系统流水码
serialNumber
.
setMaxNumber
(
serialNur
);
this
.
save
(
serialNumber
);
//流水码4位整数,自动用0补齐
String
serialNurStr
=
String
.
format
(
"%03d"
,
serialNur
);
//技术文件:4位单据类型(GSTZ)-4位年度号-3位流水号 质保类、技术文档类:GSTZ2-4位年度号-3位流水号
StringBuilder
codeBuilder
=
new
StringBuilder
();
if
(
TECHNICAL_FILE
.
equals
(
oneLevCategory
))
{
codeBuilder
.
append
(
GSTZ
)
.
append
(
"-"
)
.
append
(
datetimeString
)
.
append
(
"-"
)
.
append
(
serialNurStr
);
}
if
(
TECHNICAL_DOC
.
equals
(
oneLevCategory
)
||
QAP_DOC
.
equals
(
oneLevCategory
))
{
codeBuilder
.
append
(
GSTZ2
)
.
append
(
"-"
)
.
append
(
datetimeString
)
.
append
(
"-"
)
.
append
(
serialNurStr
);
}
return
codeBuilder
.
toString
();
}
}
dcs-doc-expand-core/src/main/java/com/yonde/dcs/core/service/shadow/ExtSerialNumberServiceShadow.java
0 → 100644
View file @
0482245c
package
com
.
yonde
.
dcs
.
core
.
service
.
shadow
;
import
com.yonde.dcs.common.vo.ExtSerialNumberVO
;
import
com.yonde.dex.dao.service.BaseIdEntityService
;
public
interface
ExtSerialNumberServiceShadow
<
V
extends
ExtSerialNumberVO
>
extends
BaseIdEntityService
<
V
>{
}
dcs-doc-expand-entity/src/main/java/com/yonde/dcs/entity/po/ExtSendFormLink.java
View file @
0482245c
package
com
.
yonde
.
dcs
.
entity
.
po
;
package
com
.
yonde
.
dcs
.
entity
.
po
;
import
org.springframework.data.annotation.CreatedBy
;
import
javax.persistence.UniqueConstraint
;
import
java.util.Date
;
import
java.time.LocalDateTime
;
import
lombok.EqualsAndHashCode
;
import
org.springframework.data.annotation.LastModifiedDate
;
import
com.yonde.dex.dao.entity.base.IdEntity
;
import
org.springframework.data.annotation.LastModifiedBy
;
import
javax.persistence.Column
;
import
org.springframework.data.annotation.CreatedDate
;
import
com.yonde.dex.basedata.entity.annotation.DexEmbedded
;
import
com.yonde.dex.basedata.entity.annotation.DexEmbedded
;
import
com.yonde.dex.dao.entity.base.DxIdEntityEmbeddable
;
import
com.yonde.dex.dao.entity.base.IdEntity
;
import
com.yonde.dex.dao.entity.base.IdOnlyEntity
;
import
com.yonde.dex.linkdata.plugin.entities.DxLinkDataEmbeddable
;
import
com.yonde.dex.linkdata.plugin.entities.DxLinkDataHolder
;
import
com.yonde.dex.logicdelete.plugin.entities.DxLogicDeleteEmbeddable
;
import
com.yonde.dex.logicdelete.plugin.entities.DxLogicDeleteHolder
;
import
lombok.Data
;
import
lombok.Data
;
import
com.yonde.dex.basedata.entity.annotation.*
;
import
lombok.EqualsAndHashCode
;
import
java.math.BigInteger
;
import
javax.persistence.*
;
import
java.math.BigDecimal
;
import
lombok.AllArgsConstructor
;
import
lombok.NoArgsConstructor
;
import
lombok.NoArgsConstructor
;
import
javax.persistence.Column
;
import
javax.persistence.Embedded
;
import
javax.persistence.Embedded
;
import
javax.persistence.Entity
;
import
javax.persistence.Entity
;
import
javax.persistence.Table
;
import
javax.persistence.Table
;
import
com.yonde.dex.dao.entity.base.IdEntity
;
import
javax.persistence.Column
;
import
com.yonde.dex.linkdata.plugin.entities.DxLinkDataHolder
;
import
com.yonde.dex.dao.entity.base.DxIdEntityEmbeddable
;
import
com.yonde.dex.dao.entity.base.IdOnlyEntity
;
import
com.yonde.dex.logicdelete.plugin.entities.DxLogicDeleteHolder
;
import
com.yonde.dex.linkdata.plugin.entities.DxLinkDataEmbeddable
;
import
com.yonde.dex.logicdelete.plugin.entities.DxLogicDeleteEmbeddable
;
/**
/**
* @description: ExtSendFormLink-PO实体
* @description: ExtSendFormLink-PO实体
* @author: dexadmin
* @author: dexadmin
* @version: V
* @version: V
* @date: 2024-
8-2 15:26:35
* @date: 2024-
7-15 15:32:36
**/
**/
@Entity
@Entity
@EqualsAndHashCode
(
callSuper
=
true
)
@EqualsAndHashCode
(
callSuper
=
true
)
...
...
dcs-doc-expand-entity/src/main/java/com/yonde/dcs/entity/po/ExtSerialNumber.java
0 → 100644
View file @
0482245c
package
com
.
yonde
.
dcs
.
entity
.
po
;
import
com.vladmihalcea.hibernate.type.json.JsonStringType
;
import
lombok.*
;
import
org.hibernate.annotations.TypeDef
;
import
org.springframework.data.annotation.CreatedBy
;
import
javax.persistence.UniqueConstraint
;
import
java.util.Date
;
import
java.time.LocalDateTime
;
import
org.springframework.data.annotation.LastModifiedDate
;
import
com.yonde.dex.dao.entity.base.IdEntity
;
import
org.springframework.data.annotation.LastModifiedBy
;
import
javax.persistence.Column
;
import
org.springframework.data.annotation.CreatedDate
;
import
com.yonde.dex.basedata.entity.annotation.DexEmbedded
;
import
com.yonde.dex.basedata.entity.annotation.*
;
import
java.math.BigInteger
;
import
javax.persistence.*
;
import
java.math.BigDecimal
;
import
javax.persistence.Column
;
import
javax.persistence.Embedded
;
import
javax.persistence.Entity
;
import
javax.persistence.Table
;
import
com.yonde.dex.dao.entity.base.IdEntity
;
import
javax.persistence.Column
;
import
com.yonde.dex.linkdata.plugin.entities.DxLinkDataHolder
;
import
com.yonde.dex.dao.entity.base.DxIdEntityEmbeddable
;
import
com.yonde.dex.dao.entity.base.IdOnlyEntity
;
import
com.yonde.dex.logicdelete.plugin.entities.DxLogicDeleteHolder
;
import
com.yonde.dex.linkdata.plugin.entities.DxLinkDataEmbeddable
;
import
com.yonde.dex.logicdelete.plugin.entities.DxLogicDeleteEmbeddable
;
/**
* @description: ExtSendFormLink-PO实体
* @author: dexadmin
* @version: V
* @date: 2024-8-2 15:26:35
**/
@Entity
@Table
(
name
=
"EXT_SERIAL_NUMBER"
)
@TypeDef
(
name
=
"json"
,
typeClass
=
JsonStringType
.
class
)
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
@ToString
(
callSuper
=
true
)
public
class
ExtSerialNumber
extends
IdOnlyEntity
implements
IdEntity
{
/**
* dao扩展对象
*/
@DexEmbedded
()
@Embedded
()
private
DxIdEntityEmbeddable
dxIdEmbeddable
;
/**
* 扩展PO属性
*/
@DexEmbedded
()
@Embedded
()
private
DxLogicDeleteEmbeddable
dxLogicDeleteEmbeddable
;
/**
* 扩展PO属性
*/
@DexEmbedded
()
@Embedded
()
private
DxLinkDataEmbeddable
dxLinkDataEmbeddable
;
private
Long
contextId
;
private
String
oneLevCategory
;
private
String
className
;
private
String
subTypeName
;
private
Long
maxNumber
;
}
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