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
9e9c8458
Commit
9e9c8458
authored
Jul 22, 2022
by
fangxinjiang
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop' into develop
parents
cbbb465d
c660337b
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
50 additions
and
53 deletions
+50
-53
TEmployeeContractInfo.java
...d/plus/v1/yifu/archives/entity/TEmployeeContractInfo.java
+8
-0
TEmployeeContractInfoServiceImpl.java
...chives/service/impl/TEmployeeContractInfoServiceImpl.java
+22
-6
TEmployeeContractInfoMapper.xml
...src/main/resources/mapper/TEmployeeContractInfoMapper.xml
+1
-1
TSocialFundInfoController.java
.../v1/yifu/social/controller/TSocialFundInfoController.java
+4
-44
TSocialFundInfoService.java
...d/plus/v1/yifu/social/service/TSocialFundInfoService.java
+8
-1
TSocialFundInfoServiceImpl.java
.../yifu/social/service/impl/TSocialFundInfoServiceImpl.java
+7
-1
No files found.
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/entity/TEmployeeContractInfo.java
View file @
9e9c8458
...
...
@@ -435,6 +435,14 @@ public class TEmployeeContractInfo extends BaseEntity {
@Schema
(
description
=
"原因说明"
,
name
=
"reason"
)
private
String
reason
;
/**
* 作废、终止选择的合同id
*/
@Length
(
max
=
32
,
message
=
"作废、终止选择的合同id不能超过32个字符"
)
@ExcelAttribute
(
name
=
"作废、终止选择的合同id"
,
maxLength
=
32
)
@Schema
(
description
=
"作废、终止选择的合同id"
,
name
=
"reason"
)
private
String
oldContractId
;
/**
* 是否附件 0是/1否
*/
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeeContractInfoServiceImpl.java
View file @
9e9c8458
...
...
@@ -416,14 +416,11 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
}
if
(
tEmployeeContractInfo
.
getAuditStatus
()
==
CommonConstants
.
dingleDigitIntArray
[
2
])
{
//先停用项目内的其他的员工合同
baseMapper
.
updateInUseStatusById
(
contractInfo
.
getEmpId
(),
contractInfo
.
getSettleDomain
()
,
contractInfo
.
getId
(),
CommonConstants
.
ONE_STRING
);
// 作废、终止,不变为在用
if
(
Common
.
isEmpty
(
contractInfo
.
getSituation
())
||
(!
EmployeeConstants
.
SITUATION_SIX
.
equals
(
contractInfo
.
getSituation
())
&&
!
EmployeeConstants
.
SITUATION_SEVEN
.
equals
(
contractInfo
.
getSituation
())))
{
tEmployeeContractInfo
.
setAuditTimeLast
(
LocalDateTime
.
now
());
tEmployeeContractInfo
.
setInUse
(
CommonConstants
.
ZERO_STRING
);
// 更新档案、项目合同状态为(1可用)
TEmployeeProject
tEmployeeProject
=
tEmployeeProjectService
.
getOne
(
Wrappers
.<
TEmployeeProject
>
query
()
...
...
@@ -443,6 +440,25 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
tEmployeeInfoService
.
updateById
(
tEmployeeInfo
);
}
}
else
{
//先停用项目内的其他的员工合同————不要这个逻辑了
// 2022-7-22 16:54:12 产品倩倩与测试说,作废终止审核通过,仅将原先选择的合同不在用即可
//baseMapper.updateInUseStatusById(contractInfo.getEmpId(), contractInfo.getSettleDomain(), contractInfo.getId(), CommonConstants.ONE_STRING)
if
(
Common
.
isNotNull
(
contractInfo
.
getOldContractId
()))
{
TEmployeeContractInfo
old
=
this
.
getById
(
contractInfo
.
getOldContractId
());
if
(
old
!=
null
&&
Common
.
isNotNull
(
old
.
getId
()))
{
if
(!
CommonConstants
.
ZERO_STRING
.
equals
(
old
.
getInUse
()))
{
return
R
.
failed
(
"关联的原合同已不在用"
);
}
else
{
old
.
setInUse
(
CommonConstants
.
ONE_STRING
);
this
.
updateById
(
old
);
}
}
else
{
return
R
.
failed
(
"未找到关联的原合同"
);
}
}
else
{
return
R
.
failed
(
"未找到关联的原合同"
);
}
// 作废、终止审核通过:
// 更新项目合同状态为(2不在用),档案状态要判断
TEmployeeProject
tEmployeeProject
=
tEmployeeProjectService
.
getOne
(
Wrappers
.<
TEmployeeProject
>
query
()
...
...
@@ -473,7 +489,6 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
tEmployeeInfoService
.
updateById
(
tEmployeeInfo
);
}
}
tEmployeeContractInfo
.
setAuditTimeLast
(
LocalDateTime
.
now
());
}
// 不是待提交,记录审核记录
this
.
setAuditInfo
(
tEmployeeContractInfo
);
...
...
@@ -777,6 +792,7 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
if
(
contractInfo
==
null
)
{
errorInfo
.
append
(
EmployeeConstants
.
CONTRACT_NO_IN_USE
);
}
else
{
insert
.
setOldContractId
(
contractInfo
.
getId
());
insert
.
setContractName
(
contractInfo
.
getContractName
());
insert
.
setContractSubName
(
contractInfo
.
getContractSubName
());
insert
.
setReason
(
contractInfo
.
getReason
());
...
...
@@ -828,7 +844,7 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
&&
Common
.
isNotNull
(
insert
.
getContractStart
())
&&
Common
.
isNotNull
(
insert
.
getContractEnd
()))
{
int
monthDiff
=
DateUtil
.
getMonthDiff
(
insert
.
getContractStart
(),
insert
.
getContractEnd
());
BigDecimal
b
=
new
BigDecimal
(
String
.
valueOf
(
monthDiff
/
12.0
));
BigDecimal
b
=
new
BigDecimal
(
String
.
valueOf
(
monthDiff
/
12.0
));
b
=
b
.
setScale
(
1
,
BigDecimal
.
ROUND_HALF_UP
);
insert
.
setContractTerm
(
String
.
valueOf
(
b
));
}
...
...
yifu-archives/yifu-archives-biz/src/main/resources/mapper/TEmployeeContractInfoMapper.xml
View file @
9e9c8458
...
...
@@ -435,7 +435,7 @@
GROUP_CONCAT(concat(a.CONTRACT_START,'~',ifnull(a.CONTRACT_END,'')) ORDER BY a.CONTRACT_START asc) HISTORY
FROM t_employee_contract_info a
<where>
a.DELETE_FLAG = 0 and a.AUDIT_TIME_LAST is not null
a.DELETE_FLAG = 0 and a.AUDIT_TIME_LAST is not null
and a.SITUATION != '作废' and a.SITUATION != '终止'
<include
refid=
"tEmployeeContractInfo_where"
/>
</where>
GROUP BY a.EMP_IDCARD,a.SETTLE_DOMAIN
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/controller/TSocialFundInfoController.java
View file @
9e9c8458
...
...
@@ -73,7 +73,6 @@ public class TSocialFundInfoController {
*/
@Operation
(
summary
=
"不分页查询"
,
description
=
"不分页查询"
)
@PostMapping
(
"/noPage"
)
//@PreAuthorize("@pms.hasPermission('demo_tsocialfundinfo_get')" )
public
R
<
List
<
TSocialFundInfo
>>
getTSocialFundInfoNoPage
(
@RequestBody
TSocialFundInfoSearchVo
tSocialFundInfo
)
{
return
R
.
ok
(
tSocialFundInfoService
.
noPageDiy
(
tSocialFundInfo
));
}
...
...
@@ -85,50 +84,11 @@ public class TSocialFundInfoController {
*/
@Operation
(
summary
=
"通过id查询"
,
description
=
"通过id查询:hasPermission('demo_tsocialfundinfo_get')"
)
@GetMapping
(
"/{id}"
)
@PreAuthorize
(
"@pms.hasPermission('
demo_
tsocialfundinfo_get')"
)
@PreAuthorize
(
"@pms.hasPermission('tsocialfundinfo_get')"
)
public
R
<
TSocialFundInfo
>
getById
(
@PathVariable
(
"id"
)
String
id
)
{
return
R
.
ok
(
tSocialFundInfoService
.
getById
(
id
));
}
/**
* 新增社保公积金查询表
* @param tSocialFundInfo 社保公积金查询表
* @return R
*/
@Operation
(
summary
=
"新增社保公积金查询表"
,
description
=
"新增社保公积金查询表:hasPermission('demo_tsocialfundinfo_add')"
)
@SysLog
(
"新增社保公积金查询表"
)
@PostMapping
@PreAuthorize
(
"@pms.hasPermission('demo_tsocialfundinfo_add')"
)
public
R
<
Boolean
>
save
(
@RequestBody
TSocialFundInfo
tSocialFundInfo
)
{
return
R
.
ok
(
tSocialFundInfoService
.
save
(
tSocialFundInfo
));
}
/**
* 修改社保公积金查询表
* @param tSocialFundInfo 社保公积金查询表
* @return R
*/
@Operation
(
summary
=
"修改社保公积金查询表"
,
description
=
"修改社保公积金查询表:hasPermission('demo_tsocialfundinfo_edit')"
)
@SysLog
(
"修改社保公积金查询表"
)
@PutMapping
@PreAuthorize
(
"@pms.hasPermission('demo_tsocialfundinfo_edit')"
)
public
R
<
Boolean
>
updateById
(
@RequestBody
TSocialFundInfo
tSocialFundInfo
)
{
return
R
.
ok
(
tSocialFundInfoService
.
updateById
(
tSocialFundInfo
));
}
/**
* 通过id删除社保公积金查询表
* @param id id
* @return R
*/
@Operation
(
summary
=
"通过id删除社保公积金查询表"
,
description
=
"通过id删除社保公积金查询表:hasPermission('demo_tsocialfundinfo_del')"
)
@SysLog
(
"通过id删除社保公积金查询表"
)
@DeleteMapping
(
"/{id}"
)
@PreAuthorize
(
"@pms.hasPermission('demo_tsocialfundinfo_del')"
)
public
R
<
Boolean
>
removeById
(
@PathVariable
String
id
)
{
return
R
.
ok
(
tSocialFundInfoService
.
removeById
(
id
));
}
/**
* 社保公积金查询表 批量导入
*
...
...
@@ -136,10 +96,10 @@ public class TSocialFundInfoController {
* @date 2022-07-15 11:38:05
**/
@SneakyThrows
@Operation
(
description
=
"批量
新增社保公积金查询表
hasPermission('demo_tsocialfundinfo-batch-import')"
)
@SysLog
(
"批量
新增社保公积金查询表
"
)
@Operation
(
description
=
"批量
调基
hasPermission('demo_tsocialfundinfo-batch-import')"
)
@SysLog
(
"批量
调基
"
)
@PostMapping
(
"/importListAdd"
)
@PreAuthorize
(
"@pms.hasPermission('
demo_
tsocialfundinfo-batch-import')"
)
@PreAuthorize
(
"@pms.hasPermission('tsocialfundinfo-batch-import')"
)
public
R
<
List
<
ErrorMessage
>>
importListAdd
(
@RequestBody
MultipartFile
file
){
return
tSocialFundInfoService
.
importDiy
(
file
.
getInputStream
());
}
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/TSocialFundInfoService.java
View file @
9e9c8458
...
...
@@ -44,7 +44,14 @@ public interface TSocialFundInfoService extends IService<TSocialFundInfo> {
*/
IPage
<
TSocialFundInfo
>
getTSocialFundInfoPage
(
Page
<
TSocialFundInfo
>
page
,
TSocialFundInfoSearchVo
tSocialFundInfo
);
R
<
List
<
ErrorMessage
>>
importDiy
(
InputStream
inputStream
);
/**
* @param inputStream
* @Description: 批量调基
* @Author: hgw
* @Date: 2022/7/22 11:32
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.util.List < com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage>>
**/
R
<
List
<
ErrorMessage
>>
importDiy
(
InputStream
inputStream
);
void
listExport
(
HttpServletResponse
response
,
TSocialFundInfoSearchVo
searchVo
);
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TSocialFundInfoServiceImpl.java
View file @
9e9c8458
...
...
@@ -181,11 +181,17 @@ public class TSocialFundInfoServiceImpl extends ServiceImpl<TSocialFundInfoMappe
return
wrapper
;
}
/**
* @param inputStream
* @Description: 批量调基
* @Author: hgw
* @Date: 2022/7/22 11:32
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.util.List < com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage>>
**/
@Override
public
R
<
List
<
ErrorMessage
>>
importDiy
(
InputStream
inputStream
)
{
List
<
ErrorMessage
>
errorMessageList
=
new
ArrayList
<>();
ExcelUtil
<
TSocialFundInfoVo
>
util1
=
new
ExcelUtil
<>(
TSocialFundInfoVo
.
class
);
;
// 写法2:
// 匿名内部类 不用额外写一个DemoDataListener
// 这里 需要指定读用哪个class去读,然后读取第一个sheet 文件流会自动关闭
...
...
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