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
8a8fb30c
Commit
8a8fb30c
authored
Jun 22, 2022
by
fangxinjiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
附件信息调整
parent
68fd3939
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
105 additions
and
25 deletions
+105
-25
EmpFamilyExcelVO.java
...yifu/cloud/plus/v1/yifu/archives/vo/EmpFamilyExcelVO.java
+1
-0
FileUploadController.java
...lus/v1/yifu/archives/controller/FileUploadController.java
+0
-2
TEmployeeProjectServiceImpl.java
...fu/archives/service/impl/TEmployeeProjectServiceImpl.java
+0
-1
ChecksUtil.java
...n/java/com/yifu/cloud/plus/v1/check/utils/ChecksUtil.java
+2
-0
TCheckMobileServiceImpl.java
...d/plus/v1/check/service/impl/TCheckMobileServiceImpl.java
+30
-22
CommonConstants.java
...ud.plus.v1/yifu/common/core/constant/CommonConstants.java
+3
-0
Common.java
.../com/yifu.cloud.plus.v1/yifu/common/core/util/Common.java
+4
-0
DictController.java
...u.cloud.plus.v1/yifu/admin/controller/DictController.java
+22
-0
SysDictItemService.java
....cloud.plus.v1/yifu/admin/service/SysDictItemService.java
+6
-0
SysDictItemServiceImpl.java
...us.v1/yifu/admin/service/impl/SysDictItemServiceImpl.java
+37
-0
No files found.
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/vo/EmpFamilyExcelVO.java
View file @
8a8fb30c
...
@@ -5,6 +5,7 @@ import com.alibaba.excel.annotation.write.style.ColumnWidth;
...
@@ -5,6 +5,7 @@ import com.alibaba.excel.annotation.write.style.ColumnWidth;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
lombok.Data
;
import
javax.validation.constraints.Max
;
import
javax.validation.constraints.NotNull
;
import
javax.validation.constraints.NotNull
;
import
javax.validation.constraints.Past
;
import
javax.validation.constraints.Past
;
import
java.io.Serializable
;
import
java.io.Serializable
;
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/controller/FileUploadController.java
View file @
8a8fb30c
...
@@ -162,8 +162,6 @@ public class FileUploadController {
...
@@ -162,8 +162,6 @@ public class FileUploadController {
unitAtta
.
setAttaType
(
key
.
substring
(
key
.
lastIndexOf
(
point
)));
unitAtta
.
setAttaType
(
key
.
substring
(
key
.
lastIndexOf
(
point
)));
}
}
unitAtta
.
setCreateTime
(
LocalDateTime
.
now
());
unitAtta
.
setCreateTime
(
LocalDateTime
.
now
());
YifuUser
user
=
SecurityUtils
.
getUser
();
unitAtta
.
setCreateUser
(
null
==
user
?
""
:
user
.
getId
().
toString
());
return
unitAtta
;
return
unitAtta
;
}
}
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeeProjectServiceImpl.java
View file @
8a8fb30c
...
@@ -184,7 +184,6 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
...
@@ -184,7 +184,6 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
tEmployeeLog
.
setEmpId
(
empId
);
tEmployeeLog
.
setEmpId
(
empId
);
tEmployeeLog
.
setType
(
type
);
tEmployeeLog
.
setType
(
type
);
tEmployeeLog
.
setProjectId
(
empProId
);
tEmployeeLog
.
setProjectId
(
empProId
);
tEmployeeLog
.
setContent
(
content
);
tEmployeeLogService
.
save
(
tEmployeeLog
);
tEmployeeLogService
.
save
(
tEmployeeLog
);
}
}
...
...
yifu-check/yifu-check-api/src/main/java/com/yifu/cloud/plus/v1/check/utils/ChecksUtil.java
View file @
8a8fb30c
...
@@ -100,6 +100,8 @@ public class ChecksUtil {
...
@@ -100,6 +100,8 @@ public class ChecksUtil {
checkBankNo
.
setMessage
(
message
);
checkBankNo
.
setMessage
(
message
);
checkBankNo
.
setRemark
(
getJsonElementValue
(
resJson
.
getAsJsonObject
().
get
(
ChecksConstants
.
REMARK
)));
checkBankNo
.
setRemark
(
getJsonElementValue
(
resJson
.
getAsJsonObject
().
get
(
ChecksConstants
.
REMARK
)));
checkBankNo
.
setType
(
CommonConstants
.
ONE_STRING
);
checkBankNo
.
setType
(
CommonConstants
.
ONE_STRING
);
checkBankNo
.
setName
(
name
);
checkBankNo
.
setIdNum
(
idNum
);
}
}
}
else
{
}
else
{
// 记录错误日志,正式项目中请换成log打印
// 记录错误日志,正式项目中请换成log打印
...
...
yifu-check/yifu-check-biz/src/main/java/com/yifu/cloud/plus/v1/check/service/impl/TCheckMobileServiceImpl.java
View file @
8a8fb30c
...
@@ -55,8 +55,8 @@ public class TCheckMobileServiceImpl extends ServiceImpl<TCheckMobileMapper, TCh
...
@@ -55,8 +55,8 @@ public class TCheckMobileServiceImpl extends ServiceImpl<TCheckMobileMapper, TCh
**/
**/
@Override
@Override
public
R
<
Map
<
String
,
TCheckMobile
>>
checkMobiles
(
String
mobiles
){
public
R
<
Map
<
String
,
TCheckMobile
>>
checkMobiles
(
String
mobiles
){
R
<
Map
<
String
,
TCheckMobile
>>
mobileMapR
;
R
<
Map
<
String
,
TCheckMobile
>>
mobileMapR
=
null
;
Map
<
String
,
TCheckMobile
>
checkMobileMap
;
Map
<
String
,
TCheckMobile
>
checkMobileMap
=
null
;
Map
<
String
,
TCheckMobile
>
existMap
=
new
HashMap
<>();
Map
<
String
,
TCheckMobile
>
existMap
=
new
HashMap
<>();
if
(
Common
.
isNotNull
(
mobiles
)){
if
(
Common
.
isNotNull
(
mobiles
)){
List
<
String
>
mobileList
=
Common
.
initStrToList
(
mobiles
,
CommonConstants
.
COMMA_STRING
);
List
<
String
>
mobileList
=
Common
.
initStrToList
(
mobiles
,
CommonConstants
.
COMMA_STRING
);
...
@@ -68,28 +68,31 @@ public class TCheckMobileServiceImpl extends ServiceImpl<TCheckMobileMapper, TCh
...
@@ -68,28 +68,31 @@ public class TCheckMobileServiceImpl extends ServiceImpl<TCheckMobileMapper, TCh
.
in
(
TCheckMobile:
:
getMobile
,
mobileList
)
.
in
(
TCheckMobile:
:
getMobile
,
mobileList
)
.
eq
(
TCheckMobile:
:
getStatus
,
CommonConstants
.
ONE_STRING
));
.
eq
(
TCheckMobile:
:
getStatus
,
CommonConstants
.
ONE_STRING
));
if
(
Common
.
isNotNull
(
checkMobiles
)){
if
(
Common
.
isNotNull
(
checkMobiles
)){
checkMobiles
.
stream
().
collect
(
Collectors
.
toMap
(
TCheckMobile:
:
getMobile
,
TCheckMobile
->
TCheckMobile
));
existMap
=
checkMobiles
.
stream
().
collect
(
Collectors
.
toMap
(
TCheckMobile:
:
getMobile
,
TCheckMobile
->
TCheckMobile
));
}
}
mobileList
.
removeAll
(
existMap
.
values
());
mobileList
.
removeAll
(
existMap
.
keySet
());
//2.从远处端获取数据
//2.从远处端获取数据
mobileMapR
=
ChecksUtil
.
checkMobile
(
Common
.
ListToStr
(
mobileList
,
CommonConstants
.
COMMA_STRING
),
canCheckService
.
getCanCheck
());
if
(
Common
.
isNotNull
(
mobileList
)){
if
(
Common
.
isEmpty
(
mobileMapR
)
&&
Common
.
isEmpty
(
mobileMapR
.
getData
())){
mobileMapR
=
ChecksUtil
.
checkMobile
(
Common
.
ListToStr
(
mobileList
,
CommonConstants
.
COMMA_STRING
),
canCheckService
.
getCanCheck
());
return
R
.
failed
(
MsgUtils
.
getMessage
(
ErrorCodes
.
CHECKS_MOBILE_REQUEST_ERROR
));
if
(
Common
.
isEmpty
(
mobileMapR
)
||
Common
.
isEmpty
(
mobileMapR
.
getData
())){
}
return
R
.
failed
(
MsgUtils
.
getMessage
(
ErrorCodes
.
CHECKS_MOBILE_REQUEST_ERROR
)
checkMobileMap
=
mobileMapR
.
getData
();
+(
Common
.
isNotNull
(
mobileMapR
)?
mobileMapR
.
getMsg
():
CommonConstants
.
EMPTY_STRING
));
if
(
Common
.
isNotNull
(
mobileList
)
&&
Common
.
isNotNull
(
checkMobileMap
)){
}
TCheckMobile
checkMobile
=
null
;
checkMobileMap
=
mobileMapR
.
getData
();
for
(
String
mobile:
mobileList
){
if
(
Common
.
isNotNull
(
mobileList
)
&&
Common
.
isNotNull
(
checkMobileMap
)){
if
(
Common
.
isEmpty
(
checkMobileMap
.
get
(
mobile
))){
TCheckMobile
checkMobile
=
null
;
checkMobile
=
new
TCheckMobile
();
for
(
String
mobile:
mobileList
){
checkMobile
.
setType
(
CommonConstants
.
ONE_STRING
);
if
(
Common
.
isEmpty
(
checkMobileMap
.
get
(
mobile
))){
checkMobile
.
setMobile
(
mobile
);
checkMobile
=
new
TCheckMobile
();
checkMobile
.
setStatus
(
CommonConstants
.
TEN_STRING
);
checkMobile
.
setType
(
CommonConstants
.
ONE_STRING
);
checkMobile
.
setMessage
(
Common
.
isEmpty
(
mobileMapR
)?
MsgUtils
.
getMessage
(
ErrorCodes
.
CHECKS_MOBILE_REQUEST_ERROR
):
mobileMapR
.
getMsg
());
checkMobile
.
setMobile
(
mobile
);
checkMobile
.
setChargesstatus
(
CommonConstants
.
ZERO_STRING
);
checkMobile
.
setStatus
(
CommonConstants
.
TEN_STRING
);
checkMobile
.
setNumbertype
(
CommonConstants
.
EMPTY_STRING
);
checkMobile
.
setMessage
(
Common
.
isEmpty
(
mobileMapR
)?
MsgUtils
.
getMessage
(
ErrorCodes
.
CHECKS_MOBILE_REQUEST_ERROR
):
mobileMapR
.
getMsg
());
checkMobile
.
setArea
(
CommonConstants
.
EMPTY_STRING
);
checkMobile
.
setChargesstatus
(
CommonConstants
.
ZERO_STRING
);
checkMobileMap
.
put
(
mobile
,
checkMobile
);
checkMobile
.
setNumbertype
(
CommonConstants
.
EMPTY_STRING
);
checkMobile
.
setArea
(
CommonConstants
.
EMPTY_STRING
);
checkMobileMap
.
put
(
mobile
,
checkMobile
);
}
}
}
}
}
}
}
...
@@ -98,8 +101,13 @@ public class TCheckMobileServiceImpl extends ServiceImpl<TCheckMobileMapper, TCh
...
@@ -98,8 +101,13 @@ public class TCheckMobileServiceImpl extends ServiceImpl<TCheckMobileMapper, TCh
}
}
if
(
Common
.
isNotNull
(
checkMobileMap
)){
if
(
Common
.
isNotNull
(
checkMobileMap
)){
this
.
saveBatch
(
checkMobileMap
.
values
());
this
.
saveBatch
(
checkMobileMap
.
values
());
}
else
{
checkMobileMap
=
new
HashMap
<>();
}
}
checkMobileMap
.
putAll
(
existMap
);
checkMobileMap
.
putAll
(
existMap
);
if
(
Common
.
isEmpty
(
mobileMapR
)){
mobileMapR
=
new
R
<>();
}
mobileMapR
.
setData
(
checkMobileMap
);
mobileMapR
.
setData
(
checkMobileMap
);
return
mobileMapR
;
return
mobileMapR
;
}
}
...
...
yifu-common/yifu-common-core/src/main/java/com/yifu.cloud.plus.v1/yifu/common/core/constant/CommonConstants.java
View file @
8a8fb30c
...
@@ -16,6 +16,8 @@
...
@@ -16,6 +16,8 @@
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
common
.
core
.
constant
;
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
common
.
core
.
constant
;
import
java.util.List
;
/**
/**
* @author lengleng
* @author lengleng
* @date 2019/2/1
* @date 2019/2/1
...
@@ -215,4 +217,5 @@ public interface CommonConstants {
...
@@ -215,4 +217,5 @@ public interface CommonConstants {
**/
**/
public
static
final
int
EMPLOYEE_INIT_NO_START
=
7
;
public
static
final
int
EMPLOYEE_INIT_NO_START
=
7
;
String
SAVE_FAILED
=
"保存失败!"
;
String
SAVE_FAILED
=
"保存失败!"
;
String
RESULT_EMPTY
=
"获取结果为空"
;
}
}
yifu-common/yifu-common-core/src/main/java/com/yifu.cloud.plus.v1/yifu/common/core/util/Common.java
View file @
8a8fb30c
...
@@ -154,4 +154,8 @@ public class Common {
...
@@ -154,4 +154,8 @@ public class Common {
}
}
return
result
;
return
result
;
}
}
public
static
<
T
>
boolean
isNotNull
(
Collection
<
T
>
obj
)
{
return
null
!=
obj
&&
obj
.
size
()
>
0
;
}
}
}
yifu-upms/yifu-upms-biz/src/main/java/com/yifu.cloud.plus.v1/yifu/admin/controller/DictController.java
View file @
8a8fb30c
...
@@ -40,7 +40,10 @@ import org.springframework.security.access.prepost.PreAuthorize;
...
@@ -40,7 +40,10 @@ import org.springframework.security.access.prepost.PreAuthorize;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
javax.validation.Valid
;
import
javax.validation.Valid
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
/**
/**
* <p>
* <p>
...
@@ -170,6 +173,25 @@ public class DictController {
...
@@ -170,6 +173,25 @@ public class DictController {
return
R
.
ok
(
sysDictItemService
.
pageItem
(
page
,
sysDictItem
));
return
R
.
ok
(
sysDictItemService
.
pageItem
(
page
,
sysDictItem
));
}
}
/**
* 获取所有字典数据
* @return
*/
@GetMapping
(
"/item/getAllDictItem"
)
public
R
<
Map
<
String
,
Object
>>
getSysDictItemPage
()
{
return
sysDictItemService
.
getSysDictItemPage
();
}
/**
* 通过id查询父级字典的字典值
* @param itemTypes
* @return R
*/
@SysLog
(
"通过id查询父级字典的字典值"
)
@GetMapping
(
"/getParentDictItemByTypes"
)
public
R
<
Map
<
String
,
Object
>>
getParentDictItemByTypes
(
String
itemTypes
)
{
return
sysDictItemService
.
getParentDictItemByTypes
(
itemTypes
);
}
/**
/**
* 通过id查询字典项
* 通过id查询字典项
* @param id id
* @param id id
...
...
yifu-upms/yifu-upms-biz/src/main/java/com/yifu.cloud.plus.v1/yifu/admin/service/SysDictItemService.java
View file @
8a8fb30c
...
@@ -23,6 +23,7 @@ import com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysDictItem;
...
@@ -23,6 +23,7 @@ import com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysDictItem;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
/**
/**
* 字典项
* 字典项
...
@@ -57,4 +58,9 @@ public interface SysDictItemService extends IService<SysDictItem> {
...
@@ -57,4 +58,9 @@ public interface SysDictItemService extends IService<SysDictItem> {
IPage
<
SysDictItem
>
pageItem
(
Page
page
,
SysDictItem
sysDictItem
);
IPage
<
SysDictItem
>
pageItem
(
Page
page
,
SysDictItem
sysDictItem
);
R
<
Boolean
>
removeDictItemDiy
(
Long
id
);
R
<
Boolean
>
removeDictItemDiy
(
Long
id
);
R
<
Map
<
String
,
Object
>>
getParentDictItemByTypes
(
String
itemTypes
);
R
<
Map
<
String
,
Object
>>
getSysDictItemPage
();
}
}
yifu-upms/yifu-upms-biz/src/main/java/com/yifu.cloud.plus.v1/yifu/admin/service/impl/SysDictItemServiceImpl.java
View file @
8a8fb30c
...
@@ -146,6 +146,43 @@ public class SysDictItemServiceImpl extends ServiceImpl<SysDictItemMapper, SysDi
...
@@ -146,6 +146,43 @@ public class SysDictItemServiceImpl extends ServiceImpl<SysDictItemMapper, SysDi
return
R
.
ok
(
baseMapper
.
deleteById
(
id
)
>
0
);
return
R
.
ok
(
baseMapper
.
deleteById
(
id
)
>
0
);
}
}
@Override
public
R
<
Map
<
String
,
Object
>>
getParentDictItemByTypes
(
String
itemTypes
)
{
if
(
Common
.
isEmpty
(
itemTypes
)){
return
R
.
failed
(
CommonConstants
.
RESULT_EMPTY
);
}
Map
<
String
,
Object
>
resultMap
=
new
HashMap
<>();
List
<
SysDictItem
>
allList
=
baseMapper
.
selectList
(
Wrappers
.<
SysDictItem
>
query
().
lambda
()
.
in
(
SysDictItem:
:
getType
,
Common
.
initStrToList
(
itemTypes
,
CommonConstants
.
COMMA_STRING
))
.
eq
(
SysDictItem:
:
getDelFlag
,
CommonConstants
.
ZERO_STRING
));
extracted
(
allList
,
resultMap
);
return
R
.
ok
(
resultMap
);
}
@Override
public
R
<
Map
<
String
,
Object
>>
getSysDictItemPage
()
{
List
<
SysDictItem
>
allList
=
baseMapper
.
selectList
(
Wrappers
.<
SysDictItem
>
query
().
lambda
()
.
eq
(
SysDictItem:
:
getDelFlag
,
CommonConstants
.
ZERO_STRING
));
Map
<
String
,
Object
>
resultMap
=
new
HashMap
<>();
extracted
(
allList
,
resultMap
);
return
R
.
ok
(
resultMap
);
}
private
void
extracted
(
List
<
SysDictItem
>
allList
,
Map
<
String
,
Object
>
resultMap
)
{
if
(
Common
.
isNotNull
(
allList
)){
for
(
SysDictItem
item
:
allList
)
{
String
dictCode
=
item
.
getType
();
if
(
resultMap
.
get
(
dictCode
)
==
null
)
{
Map
<
String
,
Object
>
dictMap
=
new
HashMap
<
String
,
Object
>();
dictMap
.
put
(
item
.
getValue
(),
item
.
getLabel
());
resultMap
.
put
(
dictCode
,
dictMap
);
}
else
{
Map
dictMap
=
(
Map
)
resultMap
.
get
(
dictCode
);
dictMap
.
put
(
item
.
getValue
(),
item
.
getLabel
());
}
}
}
}
/**
/**
* 构建查询的 wrapper
* 构建查询的 wrapper
* @param sysDictItem 查询条件
* @param sysDictItem 查询条件
...
...
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