Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
yifu-mvp
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
fangxinjiang
yifu-mvp
Commits
ab8dbb4b
Commit
ab8dbb4b
authored
Jul 12, 2022
by
hongguangwu
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop' into develop
parents
695b917d
b7b10efb
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
109 additions
and
46 deletions
+109
-46
FddContractAttachInfoServiceImpl.java
...chives/service/impl/FddContractAttachInfoServiceImpl.java
+1
-1
TElecEmployeeInfoServiceImpl.java
...u/archives/service/impl/TElecEmployeeInfoServiceImpl.java
+30
-2
TEmployeeProjectServiceImpl.java
...fu/archives/service/impl/TEmployeeProjectServiceImpl.java
+76
-41
daprConfig.properties
...yifu-common-dapr/src/main/resources/daprConfig.properties
+1
-1
DictController.java
...u.cloud.plus.v1/yifu/admin/controller/DictController.java
+1
-1
No files found.
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/FddContractAttachInfoServiceImpl.java
View file @
ab8dbb4b
...
...
@@ -575,7 +575,7 @@ public class FddContractAttachInfoServiceImpl extends ServiceImpl<FddContractAtt
jsonObject
.
put
(
"value"
,
fddContractTemplate
.
getType
());
jsonObject
.
put
(
"type"
,
"personnel_type"
);
R
<
String
>
res
=
HttpDaprUtil
.
invokeMethodPost
(
daprUpmsProperties
.
getAppUrl
(),
daprUpmsProperties
.
getAppId
()
,
"/dict/inner/getLableFronValue"
,
null
,
Map
.
class
,
SecurityConstants
.
FROM_IN
);
,
"/dict/inner/getLableFronValue"
,
jsonObject
,
Map
.
class
,
SecurityConstants
.
FROM_IN
);
if
(
res
!=
null
)
{
//电子合同模板对应的“员工类型”
newEmployeeContractInfo
.
setContractName
(
res
.
getData
());
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TElecEmployeeInfoServiceImpl.java
View file @
ab8dbb4b
...
...
@@ -30,6 +30,7 @@ import com.yifu.cloud.plus.v1.yifu.archives.service.TElecEmployeeInfoService;
import
com.yifu.cloud.plus.v1.yifu.archives.service.TEmployeeInfoService
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.exception.CheckedException
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.Common
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.core.vo.FileVo
;
...
...
@@ -170,7 +171,33 @@ public class TElecEmployeeInfoServiceImpl extends ServiceImpl<TElecEmployeeInfoM
Enumeration
<?>
entries
=
zipFile
.
entries
();
Map
<
String
,
String
>
insMap
=
new
HashMap
<>();
Map
<
String
,
String
>
map
=
new
HashMap
<>();
List
<
TElecEmployeeInfo
>
infolist
=
new
ArrayList
<>();
List
<
String
>
list
=
new
ArrayList
<>();
while
(
entries
.
hasMoreElements
())
{
ZipEntry
entry
=
(
ZipEntry
)
entries
.
nextElement
();
//添加进filesName
String
empInfo
=
entry
.
getName
();
// 如果是文件夹,就创建个文件夹
if
(!
entry
.
isDirectory
())
{
if
(
empInfo
.
length
()
>
empInfo
.
lastIndexOf
(
"/"
)
+
1
)
{
String
idCard
=
empInfo
.
substring
(
0
,
empInfo
.
indexOf
(
"/"
));
String
dataType
=
empInfo
.
substring
(
empInfo
.
indexOf
(
"/"
)
+
1
,
empInfo
.
lastIndexOf
(
"/"
));
TEmployeeInfo
tEmployeeInfo
=
tEmployeeInfoService
.
getOne
((
Wrappers
.<
TEmployeeInfo
>
query
().
lambda
()
.
eq
(
TEmployeeInfo:
:
getEmpIdcard
,
idCard
)).
eq
(
TEmployeeInfo:
:
getFileStatus
,
CommonConstants
.
ZERO_INT
)
.
eq
(
TEmployeeInfo:
:
getDeleteFlag
,
CommonConstants
.
ZERO_STRING
)
.
eq
(
TEmployeeInfo:
:
getFileStatus
,
CommonConstants
.
ZERO_INT
));
if
(
Common
.
isEmpty
(
tEmployeeInfo
))
{
return
R
.
failed
(
"未找到身份证对应的档案信息,身份证号:"
+
idCard
);
}
if
(
Common
.
isNotNull
(
elecTypeMap
))
{
if
(!
Common
.
isNotNull
(
elecTypeMap
.
get
(
dataType
)))
{
return
R
.
failed
(
"资料类型错误:"
+
dataType
);
}
}
}
}
}
while
(
entries
.
hasMoreElements
())
{
ZipEntry
entry
=
(
ZipEntry
)
entries
.
nextElement
();
//添加进filesName
...
...
@@ -199,7 +226,6 @@ public class TElecEmployeeInfoServiceImpl extends ServiceImpl<TElecEmployeeInfoM
}
TElecEmployeeInfo
tElecEmployeeInfo
=
new
TElecEmployeeInfo
();
List
<
String
>
list
=
new
ArrayList
<>();
if
(
empInfo
.
length
()
>
empInfo
.
lastIndexOf
(
"/"
)
+
1
)
{
String
idCard
=
empInfo
.
substring
(
0
,
empInfo
.
indexOf
(
"/"
));
String
dataType
=
empInfo
.
substring
(
empInfo
.
indexOf
(
"/"
)
+
1
,
empInfo
.
lastIndexOf
(
"/"
));
...
...
@@ -225,9 +251,11 @@ public class TElecEmployeeInfoServiceImpl extends ServiceImpl<TElecEmployeeInfoM
String
id
=
insMap
.
get
(
idCard
+
CommonConstants
.
DOWN_LINE_STRING
+
dataType
);
//if (!elecTypeMap.get(dataType).equals(insMap.get(idCard))) {
if
(
Common
.
isEmpty
(
id
))
{
infolist
.
add
(
tElecEmployeeInfo
);
this
.
save
(
tElecEmployeeInfo
);
insMap
.
put
(
idCard
+
CommonConstants
.
DOWN_LINE_STRING
+
dataType
,
tElecEmployeeInfo
.
getId
());
}
list
.
add
(
insMap
.
get
(
idCard
+
CommonConstants
.
DOWN_LINE_STRING
+
dataType
));
fileUploadService
.
uploadImg
(
fileCovertMultipartFile
(
targetFile
),
""
,
CommonConstants
.
EIGHT_INT
,
insMap
.
get
(
idCard
+
CommonConstants
.
DOWN_LINE_STRING
+
dataType
));
}
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeeProjectServiceImpl.java
View file @
ab8dbb4b
...
...
@@ -29,6 +29,7 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.yifu.cloud.plus.v1.check.entity.TCheckBankNo
;
import
com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysDictItem
;
import
com.yifu.cloud.plus.v1.yifu.archives.constants.EmployeeConstants
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TCustomerInfo
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeInfo
;
...
...
@@ -48,6 +49,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.exception.ErrorCodes;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.*
;
import
com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprCheckProperties
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprUpmsProperties
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.util.HttpDaprUtil
;
import
com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils
;
import
lombok.RequiredArgsConstructor
;
...
...
@@ -76,7 +78,7 @@ import java.util.stream.Collectors;
@Service
@RequiredArgsConstructor
@Log4j2
@EnableConfigurationProperties
(
DaprCheckProperties
.
class
)
@EnableConfigurationProperties
(
{
DaprUpmsProperties
.
class
,
DaprCheckProperties
.
class
}
)
public
class
TEmployeeProjectServiceImpl
extends
ServiceImpl
<
TEmployeeProjectMapper
,
TEmployeeProject
>
implements
TEmployeeProjectService
{
@Autowired
...
...
@@ -98,6 +100,9 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
@Autowired
private
DaprCheckProperties
daprCheckProperties
;
@Autowired
private
DaprUpmsProperties
daprUpmsProperties
;
@Override
public
R
addCheck
(
TEmployeeProject
tEmployeeProject
)
{
...
...
@@ -172,21 +177,23 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
if
(
Common
.
isNotNull
(
tEmployeeInfo
))
{
TCheckBankNo
check
=
new
TCheckBankNo
();
check
.
setBankNo
(
tEmployeeProject
.
getBankNo
());
check
.
setIdNum
(
tEmployeeProject
.
getEmpIdcard
());
check
.
setName
(
tEmployeeProject
.
getEmpName
());
R
<
TCheckBankNo
>
checkListR
=
HttpDaprUtil
.
invokeMethodPost
(
daprCheckProperties
.
getAppUrl
(),
daprCheckProperties
.
getAppId
()
,
"/tcheckbankno/inner/checkBankNo"
,
check
,
TCheckBankNo
.
class
,
SecurityConstants
.
FROM_IN
);
if
(
checkListR
!=
null
&&
checkListR
.
getData
()
!=
null
)
{
check
=
checkListR
.
getData
();
if
(
check
==
null
||
Common
.
isEmpty
(
check
.
getResult
()))
{
if
(
Common
.
isNotNull
(
tEmployeeProject
.
getBankNo
()))
{
TCheckBankNo
check
=
new
TCheckBankNo
();
check
.
setBankNo
(
tEmployeeProject
.
getBankNo
());
check
.
setIdNum
(
tEmployeeProject
.
getEmpIdcard
());
check
.
setName
(
tEmployeeProject
.
getEmpName
());
R
<
TCheckBankNo
>
checkListR
=
HttpDaprUtil
.
invokeMethodPost
(
daprCheckProperties
.
getAppUrl
(),
daprCheckProperties
.
getAppId
()
,
"/tcheckbankno/inner/checkBankNo"
,
check
,
TCheckBankNo
.
class
,
SecurityConstants
.
FROM_IN
);
if
(
checkListR
!=
null
&&
checkListR
.
getData
()
!=
null
)
{
check
=
checkListR
.
getData
();
if
(
check
==
null
||
Common
.
isEmpty
(
check
.
getResult
()))
{
return
R
.
failed
(
EmployeeConstants
.
CHECK_NO_RESPONSE
);
}
else
if
(
check
.
getResult
().
equals
(
CommonConstants
.
ZERO_STRING
))
{
return
R
.
failed
(
check
.
getMessage
());
}
}
else
{
return
R
.
failed
(
EmployeeConstants
.
CHECK_NO_RESPONSE
);
}
else
if
(
check
.
getResult
().
equals
(
CommonConstants
.
ZERO_STRING
))
{
return
R
.
failed
(
check
.
getMessage
());
}
}
else
{
return
R
.
failed
(
EmployeeConstants
.
CHECK_NO_RESPONSE
);
}
TEmployeeInfo
tEmployeeInfoCompare
=
tEmployeeInfoMapper
.
selectById
(
tEmployeeInfo
.
getId
());
...
...
@@ -516,13 +523,37 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
.
eq
(
TEmployeeProject:
:
getDeleteFlag
,
CommonConstants
.
STATUS_NORMAL
)
.
eq
(
TEmployeeProject:
:
getProjectStatus
,
CommonConstants
.
ZERO_INT
));
// 调用字典服务,渲染字典值
R
<
Map
<
String
,
Map
<
String
,
Map
<
String
,
String
>>>>
dictR
=
HttpDaprUtil
.
invokeMethodPost
(
daprUpmsProperties
.
getAppUrl
(),
daprUpmsProperties
.
getAppId
()
,
"/dict/inner/getDictToValue"
,
null
,
Map
.
class
,
SecurityConstants
.
FROM_IN
);
Map
<
String
,
Map
<
String
,
Map
<
String
,
String
>>>
dictDataMap
;
Map
<
String
,
Map
<
String
,
String
>>
dictMap
;
// 减项原因
Map
<
String
,
String
>
empReduceMap
;
if
(
dictR
==
null
||
dictR
.
getData
()
==
null
)
{
return
R
.
failed
(
"获取字典失败!"
);
}
else
{
dictDataMap
=
dictR
.
getData
();
dictMap
=
dictDataMap
.
get
(
"data"
);
if
(
dictMap
==
null
)
{
return
R
.
failed
(
"获取字典失败!!"
);
}
empReduceMap
=
dictMap
.
get
(
"reduce_project_reason"
);
}
String
leaveReason
=
""
;
if
(
empReduceMap
!=
null
)
{
leaveReason
=
empReduceMap
.
get
(
excel
.
getLeaveReason
());
}
String
errorMessage
=
""
;
if
(
Common
.
isNotNull
(
excel
.
getEmpName
()))
{
errorMessage
=
errorMessage
.
concat
(
excel
.
getEmpName
()).
concat
(
";"
);
}
else
{
errorMessage
=
" "
.
concat
(
";"
);
}
errorMessage
=
errorMessage
+
excel
.
getEmpIdcard
()
+
";"
+
excel
.
getDeptNo
()
+
";"
+
excel
.
getLeaveReason
()
+
";"
;
errorMessage
=
errorMessage
+
excel
.
getEmpIdcard
()
+
";"
+
excel
.
getDeptNo
()
+
";"
+
leaveReason
+
";"
;
if
(
Common
.
isNotNull
(
excel
.
getLeaveRemark
()))
{
errorMessage
=
errorMessage
.
concat
(
excel
.
getLeaveRemark
()).
concat
(
";"
);
}
else
{
...
...
@@ -710,21 +741,23 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
//档案有(在档人员),项目无
}
else
if
(
Common
.
isNotNull
(
tEmployeeInfo
)
&&
Common
.
isEmpty
(
tEmployeeProject
)
&&
CommonConstants
.
dingleDigitIntArray
[
0
]
==
tEmployeeInfo
.
getFileStatus
())
{
TCheckBankNo
check
=
new
TCheckBankNo
();
check
.
setBankNo
(
excel
.
getBankNo
());
check
.
setIdNum
(
excel
.
getEmpIdcard
());
check
.
setName
(
excel
.
getEmpName
());
R
<
TCheckBankNo
>
checkListR
=
HttpDaprUtil
.
invokeMethodPost
(
daprCheckProperties
.
getAppUrl
(),
daprCheckProperties
.
getAppId
()
,
"/tcheckbankno/inner/checkBankNo"
,
check
,
TCheckBankNo
.
class
,
SecurityConstants
.
FROM_IN
);
if
(
checkListR
!=
null
&&
checkListR
.
getData
()
!=
null
)
{
check
=
checkListR
.
getData
();
if
(
check
==
null
||
Common
.
isEmpty
(
check
.
getResult
()))
{
if
(
Common
.
isNotNull
(
excel
.
getBankNo
()))
{
TCheckBankNo
check
=
new
TCheckBankNo
();
check
.
setBankNo
(
excel
.
getBankNo
());
check
.
setIdNum
(
excel
.
getEmpIdcard
());
check
.
setName
(
excel
.
getEmpName
());
R
<
TCheckBankNo
>
checkListR
=
HttpDaprUtil
.
invokeMethodPost
(
daprCheckProperties
.
getAppUrl
(),
daprCheckProperties
.
getAppId
()
,
"/tcheckbankno/inner/checkBankNo"
,
check
,
TCheckBankNo
.
class
,
SecurityConstants
.
FROM_IN
);
if
(
checkListR
!=
null
&&
checkListR
.
getData
()
!=
null
)
{
check
=
checkListR
.
getData
();
if
(
check
==
null
||
Common
.
isEmpty
(
check
.
getResult
()))
{
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
EmployeeConstants
.
CHECK_NO_RESPONSE
));
}
else
if
(
check
.
getResult
().
equals
(
CommonConstants
.
ZERO_STRING
))
{
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
check
.
getMessage
()));
}
}
else
{
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
EmployeeConstants
.
CHECK_NO_RESPONSE
));
}
else
if
(
check
.
getResult
().
equals
(
CommonConstants
.
ZERO_STRING
))
{
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
check
.
getMessage
()));
}
}
else
{
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
EmployeeConstants
.
CHECK_NO_RESPONSE
));
}
updateExcelPost
(
excel
,
updateList
,
tEmployeeInfo
);
insertExcelPro
(
excel
,
proInsList
,
tEmployeeInfo
);
...
...
@@ -745,21 +778,23 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
//档案有(离职库),项目无;
}
else
if
(
Common
.
isNotNull
(
tEmployeeInfo
)
&&
CommonConstants
.
dingleDigitIntArray
[
1
]
==
tEmployeeInfo
.
getFileStatus
()
&&
Common
.
isEmpty
(
tEmployeeProject
))
{
TCheckBankNo
check
=
new
TCheckBankNo
();
check
.
setBankNo
(
excel
.
getBankNo
());
check
.
setIdNum
(
excel
.
getEmpIdcard
());
check
.
setName
(
excel
.
getEmpName
());
R
<
TCheckBankNo
>
checkListR
=
HttpDaprUtil
.
invokeMethodPost
(
daprCheckProperties
.
getAppUrl
(),
daprCheckProperties
.
getAppId
()
,
"/tcheckbankno/inner/checkBankNo"
,
check
,
TCheckBankNo
.
class
,
SecurityConstants
.
FROM_IN
);
if
(
checkListR
!=
null
&&
checkListR
.
getData
()
!=
null
)
{
check
=
checkListR
.
getData
();
if
(
check
==
null
||
Common
.
isEmpty
(
check
.
getResult
()))
{
if
(
Common
.
isNotNull
(
excel
.
getBankNo
()))
{
TCheckBankNo
check
=
new
TCheckBankNo
();
check
.
setBankNo
(
excel
.
getBankNo
());
check
.
setIdNum
(
excel
.
getEmpIdcard
());
check
.
setName
(
excel
.
getEmpName
());
R
<
TCheckBankNo
>
checkListR
=
HttpDaprUtil
.
invokeMethodPost
(
daprCheckProperties
.
getAppUrl
(),
daprCheckProperties
.
getAppId
()
,
"/tcheckbankno/inner/checkBankNo"
,
check
,
TCheckBankNo
.
class
,
SecurityConstants
.
FROM_IN
);
if
(
checkListR
!=
null
&&
checkListR
.
getData
()
!=
null
)
{
check
=
checkListR
.
getData
();
if
(
check
==
null
||
Common
.
isEmpty
(
check
.
getResult
()))
{
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
EmployeeConstants
.
CHECK_NO_RESPONSE
));
}
else
if
(
check
.
getResult
().
equals
(
CommonConstants
.
ZERO_STRING
))
{
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
check
.
getMessage
()));
}
}
else
{
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
EmployeeConstants
.
CHECK_NO_RESPONSE
));
}
else
if
(
check
.
getResult
().
equals
(
CommonConstants
.
ZERO_STRING
))
{
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
check
.
getMessage
()));
}
}
else
{
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
EmployeeConstants
.
CHECK_NO_RESPONSE
));
}
updateExcelPost
(
excel
,
updateList
,
tEmployeeInfo
);
insertExcelPro
(
excel
,
proInsList
,
tEmployeeInfo
);
...
...
yifu-common/yifu-common-dapr/src/main/resources/daprConfig.properties
View file @
ab8dbb4b
dapr.upms.appUrl
=
http://
yifu-upms.qas-mvp.svc.cluster.local
:3500/v1.0/invoke/
dapr.upms.appUrl
=
http://
localhost
:3500/v1.0/invoke/
dapr.upms.appId
=
yifu-upms
dapr.upms.appPort
=
4000
dapr.upms.httpPort
=
3500
...
...
yifu-upms/yifu-upms-biz/src/main/java/com/yifu.cloud.plus.v1/yifu/admin/controller/DictController.java
View file @
ab8dbb4b
...
...
@@ -318,7 +318,7 @@ public class DictController {
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.util.Map < java.lang.String, java.util.Map < java.lang.String, java.lang.String>>>
**/
@Inner
@
Ge
tMapping
(
"/inner/getDictToValue"
)
@
Pos
tMapping
(
"/inner/getDictToValue"
)
public
R
<
Map
<
String
,
Map
<
String
,
String
>>>
getDictToValue
()
{
return
sysDictItemService
.
getDictToValue
();
}
...
...
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