Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
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
444af7e0
You need to sign in or sign up before continuing.
Commit
444af7e0
authored
Sep 19, 2022
by
zhaji
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' into feature-zhaji
parents
4de0e087
a0f3dfad
Show whitespace changes
Inline
Side-by-side
Showing
29 changed files
with
920 additions
and
843 deletions
+920
-843
TEmpContractAlert.java
...cloud/plus/v1/yifu/archives/entity/TEmpContractAlert.java
+7
-1
TCertRecordController.java
...us/v1/yifu/archives/controller/TCertRecordController.java
+6
-0
TEmpContractAlertController.java
...yifu/archives/controller/TEmpContractAlertController.java
+16
-0
TEmployeeContractInfoController.java
.../archives/controller/TEmployeeContractInfoController.java
+37
-1
TCertRecordServiceImpl.java
...v1/yifu/archives/service/impl/TCertRecordServiceImpl.java
+6
-6
TEmpContractAlertServiceImpl.java
...u/archives/service/impl/TEmpContractAlertServiceImpl.java
+14
-1
TEmployeeContractInfoMapper.xml
...src/main/resources/mapper/TEmployeeContractInfoMapper.xml
+17
-0
MenuUtil.java
...om/yifu/cloud/plus/v1/yifu/common/dapr/util/MenuUtil.java
+1
-1
PersonVo.java
.../yifu/cloud/plus/v1/yifu/common/ldap/entity/PersonVo.java
+1
-1
PersonAttributesMapper.java
...us/v1/yifu/common/ldap/mapper/PersonAttributesMapper.java
+0
-3
LdapUtil.java
...om/yifu/cloud/plus/v1/yifu/common/ldap/util/LdapUtil.java
+11
-18
ldapConfig.properties
...yifu-common-ldap/src/main/resources/ldapConfig.properties
+1
-1
InsuranceExportListParam.java
.../plus/v1/yifu/insurances/vo/InsuranceExportListParam.java
+2
-7
InsuranceListParam.java
.../cloud/plus/v1/yifu/insurances/vo/InsuranceListParam.java
+2
-7
InsuranceRefundHandlingParam.java
...s/v1/yifu/insurances/vo/InsuranceRefundHandlingParam.java
+2
-7
InsuranceRefundParam.java
...loud/plus/v1/yifu/insurances/vo/InsuranceRefundParam.java
+2
-1
InsuredParam.java
...m/yifu/cloud/plus/v1/yifu/insurances/vo/InsuredParam.java
+2
-5
RefundExportListParam.java
...oud/plus/v1/yifu/insurances/vo/RefundExportListParam.java
+2
-7
TInsuranceDetailMapper.java
.../insurances/mapper/insurances/TInsuranceDetailMapper.java
+0
-10
TInsuranceDetailServiceImpl.java
...s/service/insurance/impl/TInsuranceDetailServiceImpl.java
+650
-694
TInsuranceDetailMapper.xml
...in/resources/mapper/insurances/TInsuranceDetailMapper.xml
+48
-25
SalaryUploadServiceImpl.java
.../v1/yifu/salary/service/impl/SalaryUploadServiceImpl.java
+1
-1
THaveSalaryNosocialServiceImpl.java
...u/salary/service/impl/THaveSalaryNosocialServiceImpl.java
+1
-1
TSalaryAccountServiceImpl.java
...1/yifu/salary/service/impl/TSalaryAccountServiceImpl.java
+5
-0
TForecastLibraryServiceImpl.java
...yifu/social/service/impl/TForecastLibraryServiceImpl.java
+69
-24
TPreDispatchInfoServiceImpl.java
...yifu/social/service/impl/TPreDispatchInfoServiceImpl.java
+4
-4
SysDeptServiceImpl.java
...d.plus.v1/yifu/admin/service/impl/SysDeptServiceImpl.java
+3
-3
SysUserServiceImpl.java
...d.plus.v1/yifu/admin/service/impl/SysUserServiceImpl.java
+5
-7
SysUserMapper.xml
...yifu-upms-biz/src/main/resources/mapper/SysUserMapper.xml
+5
-7
No files found.
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/entity/TEmpContractAlert.java
View file @
444af7e0
...
...
@@ -67,7 +67,13 @@ public class TEmpContractAlert extends BaseEntity {
@Schema
(
description
=
"员工ID"
)
@ExcelProperty
(
"员工ID"
)
private
String
empId
;
/**
* 项目id
*/
@ExcelAttribute
(
name
=
"项目id"
)
@Schema
(
description
=
"项目id"
)
@ExcelProperty
(
"项目id"
)
private
String
deptId
;
/**
* 项目名称
*/
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/controller/TCertRecordController.java
View file @
444af7e0
...
...
@@ -71,6 +71,9 @@ public class TCertRecordController {
return
R
.
failed
(
CommonConstants
.
PLEASE_LOG_IN
);
}
menuUtil
.
setAuthSql
(
user
,
searchVo
);
if
(
Common
.
isNotNull
(
searchVo
.
getAuthSql
())
&&
searchVo
.
getAuthSql
().
contains
(
CommonConstants
.
A_DEPT_ID
))
{
searchVo
.
setAuthSql
(
searchVo
.
getAuthSql
().
replace
(
CommonConstants
.
A_DEPT_ID
,
"dept_id"
));
}
return
R
.
ok
(
tCertRecordService
.
pageDiy
(
page
,
searchVo
));
}
/**
...
...
@@ -87,6 +90,9 @@ public class TCertRecordController {
return
R
.
failed
(
CommonConstants
.
PLEASE_LOG_IN
);
}
menuUtil
.
setAuthSql
(
user
,
searchVo
);
if
(
Common
.
isNotNull
(
searchVo
.
getAuthSql
())
&&
searchVo
.
getAuthSql
().
contains
(
CommonConstants
.
A_DEPT_ID
))
{
searchVo
.
setAuthSql
(
searchVo
.
getAuthSql
().
replace
(
CommonConstants
.
A_DEPT_ID
,
"dept_id"
));
}
return
R
.
ok
(
tCertRecordService
.
getTCertRecordNoPage
(
searchVo
));
}
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/controller/TEmpContractAlertController.java
View file @
444af7e0
...
...
@@ -22,9 +22,14 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpContractAlert
;
import
com.yifu.cloud.plus.v1.yifu.archives.service.TEmpContractAlertService
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.ContractAlertSearchVo
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
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.YifuUser
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.util.MenuUtil
;
import
com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog
;
import
com.yifu.cloud.plus.v1.yifu.common.security.annotation.Inner
;
import
com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.RequiredArgsConstructor
;
...
...
@@ -48,6 +53,7 @@ import java.util.List;
public
class
TEmpContractAlertController
{
private
final
TEmpContractAlertService
tEmpContractAlertService
;
private
final
MenuUtil
menuUtil
;
/**
* 分页查询
...
...
@@ -59,6 +65,11 @@ public class TEmpContractAlertController {
@GetMapping
(
"/page"
)
//@PreAuthorize("@pms.hasPermission('demo_tempcontractalert_get')" )
public
R
<
IPage
<
TEmpContractAlert
>>
getTEmpContractAlertPage
(
Page
page
,
ContractAlertSearchVo
searchVo
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
menuUtil
.
setAuthSql
(
user
,
searchVo
);
if
(
Common
.
isNotNull
(
searchVo
.
getAuthSql
())
&&
searchVo
.
getAuthSql
().
contains
(
CommonConstants
.
A_DEPT_ID
))
{
searchVo
.
setAuthSql
(
searchVo
.
getAuthSql
().
replace
(
CommonConstants
.
A_DEPT_ID
,
"dept_id"
));
}
return
R
.
ok
(
tEmpContractAlertService
.
pageDiy
(
page
,
searchVo
));
}
/**
...
...
@@ -134,6 +145,11 @@ public class TEmpContractAlertController {
@Operation
(
description
=
"导出"
)
@PostMapping
(
"/export"
)
public
void
export
(
HttpServletResponse
response
,
@RequestBody
ContractAlertSearchVo
searchVo
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
menuUtil
.
setAuthSql
(
user
,
searchVo
);
if
(
Common
.
isNotNull
(
searchVo
.
getAuthSql
())
&&
searchVo
.
getAuthSql
().
contains
(
CommonConstants
.
A_DEPT_ID
))
{
searchVo
.
setAuthSql
(
searchVo
.
getAuthSql
().
replace
(
CommonConstants
.
A_DEPT_ID
,
"dept_id"
));
}
tEmpContractAlertService
.
listExport
(
response
,
searchVo
);
}
/**
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/controller/TEmployeeContractInfoController.java
View file @
444af7e0
...
...
@@ -26,8 +26,11 @@ import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.Common
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.util.MenuUtil
;
import
com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog
;
import
com.yifu.cloud.plus.v1.yifu.common.security.annotation.Inner
;
import
com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.RequiredArgsConstructor
;
...
...
@@ -53,7 +56,7 @@ import java.util.List;
public
class
TEmployeeContractInfoController
{
private
final
TEmployeeContractInfoService
tEmployeeContractInfoService
;
private
final
MenuUtil
menuUtil
;
/**
* 申请、归档分页查询
*
...
...
@@ -64,6 +67,7 @@ public class TEmployeeContractInfoController {
@Operation
(
summary
=
"申请分页查询(全部的数据(后面加上权限:自己创建的))"
,
description
=
"申请分页查询"
)
@GetMapping
(
"/applyPage"
)
public
R
<
IPage
<
TEmployeeContractInfo
>>
getApplyPage
(
Page
<
TEmployeeContractInfo
>
page
,
TEmployeeContractInfo
tEmployeeContractInfo
)
{
this
.
setAuth
(
tEmployeeContractInfo
);
return
new
R
<>(
tEmployeeContractInfoService
.
getTEmployeeContractInfoPage
(
page
,
tEmployeeContractInfo
));
}
...
...
@@ -72,9 +76,25 @@ public class TEmployeeContractInfoController {
public
R
<
IPage
<
TEmployeeContractInfo
>>
getFilingPage
(
Page
<
TEmployeeContractInfo
>
page
,
TEmployeeContractInfo
tEmployeeContractInfo
)
{
tEmployeeContractInfo
.
setIsFilePage
(
CommonConstants
.
ONE_INT
);
tEmployeeContractInfo
.
setAuditStatus
(
CommonConstants
.
dingleDigitIntArray
[
2
]);
this
.
setAuth
(
tEmployeeContractInfo
);
return
new
R
<>(
tEmployeeContractInfoService
.
getTEmployeeContractInfoPage
(
page
,
tEmployeeContractInfo
));
}
/**
* @param tEmployeeContractInfo
* @Description: 加入权限
* @Author: hgw
* @Date: 2022/9/16 16:39
* @return: void
**/
private
void
setAuth
(
TEmployeeContractInfo
tEmployeeContractInfo
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
menuUtil
.
setAuthSql
(
user
,
tEmployeeContractInfo
);
if
(
Common
.
isNotNull
(
tEmployeeContractInfo
.
getAuthSql
())
&&
tEmployeeContractInfo
.
getAuthSql
().
contains
(
CommonConstants
.
A_DEPT_ID
))
{
tEmployeeContractInfo
.
setAuthSql
(
tEmployeeContractInfo
.
getAuthSql
().
replace
(
CommonConstants
.
A_DEPT_ID
,
"a.SETTLE_DOMAIN"
));
}
}
/**
* 合同审核分页查询
*
...
...
@@ -86,6 +106,7 @@ public class TEmployeeContractInfoController {
@GetMapping
(
"/auditPage"
)
public
R
<
IPage
<
TEmployeeContractInfo
>>
getAuditPage
(
Page
<
TEmployeeContractInfo
>
page
,
TEmployeeContractInfo
tEmployeeContractInfo
)
{
tEmployeeContractInfo
.
setAuditStatus
(
CommonConstants
.
ONE_INT
);
this
.
setAuth
(
tEmployeeContractInfo
);
return
new
R
<>(
tEmployeeContractInfoService
.
getTEmployeeContractInfoPage
(
page
,
tEmployeeContractInfo
));
}
...
...
@@ -99,6 +120,7 @@ public class TEmployeeContractInfoController {
@Operation
(
summary
=
"合同查询(全部的数据)"
,
description
=
"合同查询"
)
@GetMapping
(
"/page"
)
public
R
<
IPage
<
TEmployeeContractInfo
>>
gettemployeecontractinfoPage
(
Page
<
TEmployeeContractInfo
>
page
,
TEmployeeContractInfo
tEmployeeContractInfo
)
{
this
.
setAuth
(
tEmployeeContractInfo
);
return
new
R
<>(
tEmployeeContractInfoService
.
getTEmployeeContractInfoPage
(
page
,
tEmployeeContractInfo
));
}
...
...
@@ -263,6 +285,13 @@ public class TEmployeeContractInfoController {
@SysLog
(
"批量导出合同"
)
@PostMapping
(
"/exportContractInfo"
)
public
void
exportContractInfo
(
@RequestBody
(
required
=
false
)
TEmployeeContractInfo
contractInfo
,
HttpServletResponse
response
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(
user
!=
null
&&
!
Common
.
isEmpty
(
user
.
getId
()))
{
menuUtil
.
setAuthSql
(
user
,
contractInfo
);
if
(
Common
.
isNotNull
(
contractInfo
.
getAuthSql
())
&&
contractInfo
.
getAuthSql
().
contains
(
CommonConstants
.
A_DEPT_ID
))
{
contractInfo
.
setAuthSql
(
contractInfo
.
getAuthSql
().
replace
(
CommonConstants
.
A_DEPT_ID
,
"a.SETTLE_DOMAIN"
));
}
}
tEmployeeContractInfoService
.
exportContractInfo
(
contractInfo
,
response
);
}
...
...
@@ -276,6 +305,13 @@ public class TEmployeeContractInfoController {
@SysLog
(
"批量导出合同[历史]"
)
@PostMapping
(
"/exportContractInfoHistory"
)
public
void
exportContractInfoHistory
(
@RequestBody
(
required
=
false
)
TEmployeeContractInfo
contractInfo
,
HttpServletResponse
response
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(
user
!=
null
&&
!
Common
.
isEmpty
(
user
.
getId
()))
{
menuUtil
.
setAuthSql
(
user
,
contractInfo
);
if
(
Common
.
isNotNull
(
contractInfo
.
getAuthSql
())
&&
contractInfo
.
getAuthSql
().
contains
(
CommonConstants
.
A_DEPT_ID
))
{
contractInfo
.
setAuthSql
(
contractInfo
.
getAuthSql
().
replace
(
CommonConstants
.
A_DEPT_ID
,
"a.SETTLE_DOMAIN"
));
}
}
tEmployeeContractInfoService
.
exportContractInfoHistory
(
contractInfo
,
response
);
}
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TCertRecordServiceImpl.java
View file @
444af7e0
...
...
@@ -22,10 +22,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
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.yifu.archives.entity.TCertRecord
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeContractInfo
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeInfo
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeProject
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.*
;
import
com.yifu.cloud.plus.v1.yifu.archives.mapper.TCertRecordMapper
;
import
com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmployeeContractInfoMapper
;
import
com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmployeeInfoMapper
;
...
...
@@ -37,6 +34,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.Common
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.LocalDateTimeUtils
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity
;
import
lombok.RequiredArgsConstructor
;
import
org.springframework.stereotype.Service
;
...
...
@@ -123,9 +121,10 @@ public class TCertRecordServiceImpl extends ServiceImpl<TCertRecordMapper, TCert
public
IPage
<
TCertRecord
>
pageDiy
(
Page
page
,
CertRecordSearchVo
searchVo
)
{
LambdaQueryWrapper
<
TCertRecord
>
wrapper
=
buildQueryWrapper
(
searchVo
);
if
(
Common
.
isNotNull
(
searchVo
.
getAuthSql
()))
{
wrapper
.
last
(
searchVo
.
getAuthSql
());
wrapper
.
last
(
searchVo
.
getAuthSql
()
+
" order by CREATE_TIME desc"
);
}
else
{
wrapper
.
orderByDesc
(
BaseEntity:
:
getCreateTime
);
}
wrapper
.
orderByDesc
(
TCertRecord:
:
getCreateTime
);
return
baseMapper
.
selectPage
(
page
,
wrapper
);
}
...
...
@@ -143,6 +142,7 @@ public class TCertRecordServiceImpl extends ServiceImpl<TCertRecordMapper, TCert
}
private
LambdaQueryWrapper
buildQueryWrapper
(
CertRecordSearchVo
entity
){
LambdaQueryWrapper
<
TCertRecord
>
wrapper
=
Wrappers
.
lambdaQuery
();
wrapper
.
ne
(
TCertRecord:
:
getId
,
CommonConstants
.
ZERO_STRING
);
if
(
ArrayUtil
.
isNotEmpty
(
entity
.
getCreateTimes
()))
{
wrapper
.
ge
(
TCertRecord:
:
getOpenTime
,
entity
.
getCreateTimes
()[
0
])
.
le
(
TCertRecord:
:
getOpenTime
,
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmpContractAlertServiceImpl.java
View file @
444af7e0
...
...
@@ -65,7 +65,11 @@ public class TEmpContractAlertServiceImpl extends ServiceImpl<TEmpContractAlertM
@Override
public
IPage
<
TEmpContractAlert
>
pageDiy
(
Page
page
,
ContractAlertSearchVo
searchVo
)
{
LambdaQueryWrapper
<
TEmpContractAlert
>
wrapper
=
buildQueryWrapper
(
searchVo
);
if
(
Common
.
isNotNull
(
searchVo
.
getAuthSql
()))
{
wrapper
.
last
(
searchVo
.
getAuthSql
()
+
" order by CREATE_TIME desc"
);
}
else
{
wrapper
.
orderByDesc
(
BaseEntity:
:
getCreateTime
);
}
return
baseMapper
.
selectPage
(
page
,
wrapper
);
}
...
...
@@ -76,6 +80,10 @@ public class TEmpContractAlertServiceImpl extends ServiceImpl<TEmpContractAlertM
if
(
Common
.
isNotNull
(
idList
)){
wrapper
.
in
(
TEmpContractAlert:
:
getId
,
idList
);
}
wrapper
.
ne
(
TEmpContractAlert:
:
getId
,
CommonConstants
.
ZERO_STRING
);
if
(
Common
.
isNotNull
(
searchVo
.
getAuthSql
()))
{
wrapper
.
last
(
searchVo
.
getAuthSql
());
}
return
baseMapper
.
selectList
(
wrapper
);
}
...
...
@@ -85,6 +93,9 @@ public class TEmpContractAlertServiceImpl extends ServiceImpl<TEmpContractAlertM
if
(
Common
.
isNotNull
(
idList
)){
wrapper
.
in
(
TEmpContractAlert:
:
getId
,
idList
);
}
if
(
Common
.
isNotNull
(
searchVo
.
getAuthSql
()))
{
wrapper
.
last
(
searchVo
.
getAuthSql
());
}
if
(
searchVo
.
getLimitStart
()
>=
0
&&
searchVo
.
getLimitEnd
()
>=
0
){
wrapper
.
last
(
" limit "
+
searchVo
.
getLimitStart
()
+
","
+
searchVo
.
getLimitEnd
());
}
...
...
@@ -152,6 +163,7 @@ public class TEmpContractAlertServiceImpl extends ServiceImpl<TEmpContractAlertM
private
LambdaQueryWrapper
buildQueryWrapper
(
ContractAlertSearchVo
entity
){
LambdaQueryWrapper
<
TEmpContractAlert
>
wrapper
=
Wrappers
.
lambdaQuery
();
wrapper
.
ne
(
TEmpContractAlert:
:
getId
,
CommonConstants
.
ZERO_STRING
);
if
(
ArrayUtil
.
isNotEmpty
(
entity
.
getCreateTimes
()))
{
wrapper
.
ge
(
TEmpContractAlert:
:
getCreateTime
,
entity
.
getCreateTimes
()[
0
])
.
le
(
TEmpContractAlert:
:
getCreateTime
,
...
...
@@ -309,6 +321,7 @@ public class TEmpContractAlertServiceImpl extends ServiceImpl<TEmpContractAlertM
alert
.
setEmpName
(
contract
.
getEmpName
());
alert
.
setEmpId
(
contract
.
getEmpId
());
alert
.
setEmpCode
(
contract
.
getEmpNo
());
alert
.
setDeptId
(
contract
.
getSettleDomain
());
alert
.
setProject
(
contract
.
getSubjectDepart
());
alert
.
setProjectNo
(
contract
.
getDeptNo
());
alert
.
setEmpIdcard
(
contract
.
getEmpIdcard
());
...
...
yifu-archives/yifu-archives-biz/src/main/resources/mapper/TEmployeeContractInfoMapper.xml
View file @
444af7e0
...
...
@@ -394,10 +394,17 @@
SELECT
<include
refid=
"Base_Column_List"
/>
FROM t_employee_contract_info a
<if
test=
"tEmployeeContractInfo.authSql != null and tEmployeeContractInfo.authSql.trim() != ''"
>
left join t_employee_contract_area_res p on a.CREATE_BY=p.USER_ID
</if>
<where>
a.DELETE_FLAG = 0
<include
refid=
"tEmployeeContractInfo_where"
/>
<if
test=
"tEmployeeContractInfo.authSql != null and tEmployeeContractInfo.authSql.trim() != ''"
>
${tEmployeeContractInfo.authSql}
</if>
</where>
GROUP BY a.id
order by a.CREATE_TIME desc
</select>
...
...
@@ -418,10 +425,17 @@
SELECT
<include
refid=
"Base_Export_Column_List"
/>
FROM t_employee_contract_info a
<if
test=
"tEmployeeContractInfo.authSql != null and tEmployeeContractInfo.authSql.trim() != ''"
>
left join t_employee_contract_area_res p on a.CREATE_BY=p.USER_ID
</if>
<where>
a.DELETE_FLAG = 0
<include
refid=
"tEmployeeContractInfo_where"
/>
<if
test=
"tEmployeeContractInfo.authSql != null and tEmployeeContractInfo.authSql.trim() != ''"
>
${tEmployeeContractInfo.authSql}
</if>
</where>
GROUP BY a.id
order by a.CREATE_TIME desc
</select>
...
...
@@ -437,6 +451,9 @@
<where>
a.DELETE_FLAG = 0 and a.AUDIT_TIME_LAST is not null and a.SITUATION != '作废' and a.SITUATION != '终止'
<include
refid=
"tEmployeeContractInfo_where"
/>
<if
test=
"tEmployeeContractInfo.authSql != null and tEmployeeContractInfo.authSql.trim() != ''"
>
${tEmployeeContractInfo.authSql}
</if>
</where>
GROUP BY a.EMP_IDCARD,a.SETTLE_DOMAIN
order by a.CREATE_TIME desc
...
...
yifu-common/yifu-common-dapr/src/main/java/com/yifu/cloud/plus/v1/yifu/common/dapr/util/MenuUtil.java
View file @
444af7e0
...
...
@@ -37,7 +37,7 @@ public class MenuUtil {
public
void
setAuthSql
(
YifuUser
user
,
BaseEntity
entity
)
{
// 普通用户:
if
(
CommonConstants
.
ONE_STRING
.
equals
(
user
.
getSystemFlag
()))
{
if
(
user
!=
null
&&
Common
.
isNotNull
(
user
.
getId
())
&&
CommonConstants
.
ONE_STRING
.
equals
(
user
.
getSystemFlag
()))
{
// 菜单id
String
menuId
=
entity
.
getMId
();
...
...
yifu-common/yifu-common-ldap/src/main/java/com/yifu/cloud/plus/v1/yifu/common/ldap/entity/PersonVo.java
View file @
444af7e0
...
...
@@ -10,7 +10,7 @@ import java.util.Date;
@Data
@ToString
@Entry
(
objectClasses
=
{
"posixAccount"
,
"top"
,
"inetOrgPerson"
},
base
=
"ou=
安徽皖信人力资源管理有限公司
,ou=wanxin"
)
@Entry
(
objectClasses
=
{
"posixAccount"
,
"top"
,
"inetOrgPerson"
},
base
=
"ou=
皖信人力集团
,ou=wanxin"
)
public
class
PersonVo
{
/**
...
...
yifu-common/yifu-common-ldap/src/main/java/com/yifu/cloud/plus/v1/yifu/common/ldap/mapper/PersonAttributesMapper.java
View file @
444af7e0
...
...
@@ -28,9 +28,6 @@ public class PersonAttributesMapper implements AttributesMapper<PersonVo> {
if
(
null
!=
attributes
.
get
(
"ou"
))
{
personVo
.
setDeptName
((
String
)
attributes
.
get
(
"ou"
).
get
());
}
if
(
null
!=
attributes
.
get
(
"userPassword"
))
{
personVo
.
setPassword
((
String
)
attributes
.
get
(
"userPassword"
).
get
());
}
return
personVo
;
}
}
yifu-common/yifu-common-ldap/src/main/java/com/yifu/cloud/plus/v1/yifu/common/ldap/util/LdapUtil.java
View file @
444af7e0
...
...
@@ -10,7 +10,6 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.boot.context.properties.EnableConfigurationProperties
;
import
org.springframework.ldap.core.LdapTemplate
;
import
javax.naming.AuthenticationException
;
import
javax.naming.Context
;
import
javax.naming.NamingEnumeration
;
import
javax.naming.NamingException
;
...
...
@@ -36,7 +35,7 @@ public class LdapUtil {
private
static
LdapContext
ctx
=
null
;
private
static
Control
[]
connCtls
=
null
;
private
static
final
Control
[]
connCtls
=
null
;
/**
* @return List<SearchResultEntry>
...
...
@@ -45,16 +44,14 @@ public class LdapUtil {
* @description get请求获取指定对象信息
**/
public
List
<
SearchResultEntry
>
getAllPersonNamesWithTraditionalWay
()
{
List
<
SearchResultEntry
>
result
=
new
ArrayList
<
SearchResultEntry
>();
List
<
SearchResultEntry
>
result
=
new
ArrayList
<>();
try
{
LDAPConnection
connection
=
new
LDAPConnection
(
ldapProperties
.
getUrl
(),
ldapProperties
.
getPort
(),
ldapProperties
.
getUserName
(),
ldapProperties
.
getPassword
());
SearchRequest
searchRequest
=
new
SearchRequest
(
ldapProperties
.
getBaseDn
(),
SearchScope
.
SUB
,
"(objectclass=*)"
);
searchRequest
.
addControl
(
new
SubentriesRequestControl
());
SearchResult
searchResult
=
connection
.
search
(
searchRequest
);
for
(
SearchResultEntry
entry
:
searchResult
.
getSearchEntries
())
{
result
.
add
(
entry
);
}
result
.
addAll
(
searchResult
.
getSearchEntries
());
}
catch
(
LDAPException
e
)
{
e
.
printStackTrace
();
}
...
...
@@ -62,15 +59,14 @@ public class LdapUtil {
}
public
List
<
PersonVo
>
getAllPersons
()
{
List
<
PersonVo
>
list
=
ldapTemplate
.
search
(
query
()
return
ldapTemplate
.
search
(
query
()
.
where
(
"objectclass"
).
is
(
"posixAccount"
),
new
PersonAttributesMapper
());
return
list
;
}
// 校验用户名密码的方法
public
Boolean
authenticate
(
String
usr
,
String
pwd
)
{
boolean
valide
=
false
;
if
(
pwd
==
null
||
pwd
==
""
)
boolean
valide
;
if
(
pwd
==
null
||
""
.
equals
(
pwd
)
)
return
false
;
if
(
ctx
==
null
)
{
getCtx
();
...
...
@@ -85,9 +81,6 @@ public class LdapUtil {
ctx
.
reconnect
(
connCtls
);
valide
=
true
;
closeCtx
();
}
catch
(
AuthenticationException
e
)
{
log
.
error
(
userDN
+
" is not authenticated"
);
valide
=
false
;
}
catch
(
NamingException
e
)
{
log
.
error
(
userDN
+
" is not authenticated"
);
valide
=
false
;
...
...
@@ -99,7 +92,7 @@ public class LdapUtil {
if
(
ctx
!=
null
)
{
return
;
}
Hashtable
<
String
,
String
>
env
=
new
Hashtable
<
String
,
String
>();
Hashtable
<
String
,
String
>
env
=
new
Hashtable
<>();
env
.
put
(
Context
.
INITIAL_CONTEXT_FACTORY
,
"com.sun.jndi.ldap.LdapCtxFactory"
);
env
.
put
(
Context
.
PROVIDER_URL
,
"ldap://"
+
ldapProperties
.
getUrl
()
+
":"
+
ldapProperties
.
getPort
()
+
"/"
+
ldapProperties
.
getDn
());
...
...
@@ -120,7 +113,7 @@ public class LdapUtil {
}
public
String
getUserDN
(
String
uid
)
{
String
userDN
=
""
;
String
Builder
userDN
=
new
StringBuilder
()
;
try
{
SearchControls
constraints
=
new
SearchControls
();
constraints
.
setSearchScope
(
SearchControls
.
SUBTREE_SCOPE
);
...
...
@@ -129,13 +122,13 @@ public class LdapUtil {
Object
obj
=
en
.
nextElement
();
if
(
obj
instanceof
javax
.
naming
.
directory
.
SearchResult
)
{
javax
.
naming
.
directory
.
SearchResult
si
=
(
javax
.
naming
.
directory
.
SearchResult
)
obj
;
userDN
+=
si
.
getName
(
);
userDN
+=
","
+
ldapProperties
.
getDn
(
);
userDN
.
append
(
si
.
getName
()
);
userDN
.
append
(
","
).
append
(
ldapProperties
.
getDn
()
);
}
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
return
userDN
;
return
userDN
.
toString
()
;
}
}
yifu-common/yifu-common-ldap/src/main/resources/ldapConfig.properties
View file @
444af7e0
...
...
@@ -3,4 +3,4 @@ ldap.port=389
ldap.userName
=
cn=admin,dc=worfu,dc=com
ldap.password
=
yifu123456!
ldap.dn
=
dc=worfu,dc=com
ldap.baseDn
=
ou=
\u
5B89
\u
5FBD
\u7696\u
4FE1
\u
4EBA
\u
529B
\u
8D44
\u
6E90
\u
7BA1
\u7406\u6709\u9650\u
516C
\u
53F8,ou=wanxin,dc=worfu,dc=com
\ No newline at end of file
ldap.baseDn
=
ou=
\u7696\u
4FE1
\u
4EBA
\u
529B
\u
96C6
\u
56E2,ou=wanxin,dc=worfu,dc=com
\ No newline at end of file
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuranceExportListParam.java
View file @
444af7e0
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
vo
;
import
com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
...
...
@@ -13,7 +14,7 @@ import java.util.List;
*/
@Data
@Schema
(
description
=
"导出办理请求参数"
)
public
class
InsuranceExportListParam
implements
Serializable
{
public
class
InsuranceExportListParam
extends
BaseEntity
implements
Serializable
{
private
static
final
long
serialVersionUID
=
3623027153213352936L
;
/**
...
...
@@ -46,12 +47,6 @@ public class InsuranceExportListParam implements Serializable {
@Schema
(
description
=
"商险id集合"
)
private
List
<
String
>
idList
;
/**
* 办理地分流sql
*/
@Schema
(
description
=
"办理地分流sql"
)
private
String
regionSql
;
/**
* 购买类型, 1新增、3批增、4替换
*/
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuranceListParam.java
View file @
444af7e0
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
vo
;
import
com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
...
...
@@ -13,7 +14,7 @@ import java.util.List;
*/
@Data
@Schema
(
description
=
"投保列表请求参数"
)
public
class
InsuranceListParam
implements
Serializable
{
public
class
InsuranceListParam
extends
BaseEntity
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
4692341622141432288L
;
/**
...
...
@@ -70,12 +71,6 @@ public class InsuranceListParam implements Serializable {
@Schema
(
description
=
"项目编码列表"
)
private
List
<
String
>
deptNoList
;
/**
* 办理地分流sql
*/
@Schema
(
description
=
"办理地分流sql"
)
private
String
regionSql
;
/**
* 保单办理人
*/
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuranceRefundHandlingParam.java
View file @
444af7e0
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
vo
;
import
com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.Data
;
...
...
@@ -13,7 +14,7 @@ import java.io.Serializable;
*/
@Data
@Tag
(
name
=
"减员办理查询条件"
)
public
class
InsuranceRefundHandlingParam
implements
Serializable
{
public
class
InsuranceRefundHandlingParam
extends
BaseEntity
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
2689686777914935788L
;
...
...
@@ -77,12 +78,6 @@ public class InsuranceRefundHandlingParam implements Serializable {
@Schema
(
description
=
"是否过期 0未过期 1已过期"
)
private
Integer
isOverdue
;
/**
* 办理地分流sql
*/
@Schema
(
description
=
"办理地分流sql"
)
private
String
regionSql
;
/**
* 办理人
*/
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuranceRefundParam.java
View file @
444af7e0
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
vo
;
import
com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.Data
;
...
...
@@ -14,7 +15,7 @@ import java.util.List;
*/
@Data
@Tag
(
name
=
"已减员查询列表参数"
)
public
class
InsuranceRefundParam
implements
Serializable
{
public
class
InsuranceRefundParam
extends
BaseEntity
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
2689686777914935788L
;
/**
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuredParam.java
View file @
444af7e0
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
vo
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.baomidou.mybatisplus.annotation.FieldFill
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.Data
;
...
...
@@ -19,7 +16,7 @@ import java.util.List;
*/
@Data
@Tag
(
name
=
"已投保列表查询条件"
)
public
class
InsuredParam
implements
Serializable
{
public
class
InsuredParam
extends
BaseEntity
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
2689686777914935788L
;
/**
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/RefundExportListParam.java
View file @
444af7e0
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
vo
;
import
com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
...
...
@@ -13,7 +14,7 @@ import java.util.List;
*/
@Data
@Schema
(
description
=
"导出减员办理请求参数"
)
public
class
RefundExportListParam
implements
Serializable
{
public
class
RefundExportListParam
extends
BaseEntity
implements
Serializable
{
private
static
final
long
serialVersionUID
=
3623027153213352936L
;
/**
...
...
@@ -52,10 +53,4 @@ public class RefundExportListParam implements Serializable {
@Schema
(
description
=
"商险id集合"
)
private
List
<
String
>
idList
;
/**
* 办理地分流sql
*/
@Schema
(
description
=
"办理地分流sql"
)
private
String
regionSql
;
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/mapper/insurances/TInsuranceDetailMapper.java
View file @
444af7e0
...
...
@@ -206,16 +206,6 @@ public interface TInsuranceDetailMapper extends BaseMapper<TInsuranceDetail> {
*/
List
<
TInsuranceDetail
>
selectListByEmpIdcardNo
(
String
empIdcardNo
);
/**
* 查数据是否存在权限范围内
*
* @author zhaji
* @param regionSql
* @param id
* @return {@link TInsuranceDetail}
*/
TInsuranceDetail
selectByRegionSql
(
@Param
(
"regionSql"
)
String
regionSql
,
@Param
(
"id"
)
String
id
);
/**
* 商险订单减员列表查询
*
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/insurance/impl/TInsuranceDetailServiceImpl.java
View file @
444af7e0
...
...
@@ -19,6 +19,7 @@ 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.util.ArchivesDaprUtil
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.util.CheckDaprUtil
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.util.MenuUtil
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.util.SocialDaprUtils
;
import
com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils
;
import
com.yifu.cloud.plus.v1.yifu.ekp.constant.EkpConstants
;
...
...
@@ -101,6 +102,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
@Resource
private
SocialDaprUtils
socialDaprUtils
;
@Resource
private
MenuUtil
menuUtil
;
/***********************商险办理********************************/
/**
...
...
@@ -190,6 +193,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
@Override
public
IPage
<
InsuranceListVO
>
getInsuranceListPage
(
Page
<
InsuranceListVO
>
page
,
InsuranceListParam
param
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
menuUtil
.
setAuthSql
(
user
,
param
);
List
<
String
>
deptNoList
=
getDeptNoList
(
user
);
IPage
<
InsuranceListVO
>
insuranceList
=
new
Page
<>();
if
(
CollectionUtils
.
isEmpty
(
deptNoList
)){
...
...
@@ -250,11 +254,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
public
IPage
<
InsuranceListVO
>
getInsuranceHandleListPage
(
Page
<
InsuranceListVO
>
page
,
InsuranceListParam
param
)
{
IPage
<
InsuranceListVO
>
iPage
=
new
Page
<>();
YifuUser
user
=
SecurityUtils
.
getUser
();
String
regionSQL
=
getRegionSQL
(
user
);
if
(
StringUtils
.
isBlank
(
regionSQL
)){
return
iPage
;
}
param
.
setRegionSql
(
regionSQL
);
menuUtil
.
setAuthSql
(
user
,
param
);
Integer
buyHandleStatus
=
param
.
getBuyHandleStatus
();
if
(
buyHandleStatus
==
CommonConstants
.
TWO_INT
||
buyHandleStatus
==
CommonConstants
.
THREE_INT
){
param
.
setUpdateBy
(
user
.
getId
());
...
...
@@ -877,12 +877,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
@Override
public
R
<
List
<
InsuranceExportListVO
>>
getInsuranceExportList
(
InsuranceExportListParam
param
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
menuUtil
.
setAuthSql
(
user
,
param
);
List
<
InsuranceExportListVO
>
insuranceExportList
=
new
ArrayList
<>();
String
regionSQL
=
getRegionSQL
(
user
);
param
.
setRegionSql
(
regionSQL
);
if
(
StringUtils
.
isBlank
(
regionSQL
)){
return
R
.
ok
(
insuranceExportList
);
}
//如勾选项不为空,则导出勾选记录;否则导出当前筛选条件下 && 「待投保」的结果集
if
(
CollectionUtils
.
isNotEmpty
(
param
.
getIdList
())){
insuranceExportList
=
baseMapper
.
getInsuranceExportListBySelect
(
param
.
getIdList
());
...
...
@@ -1295,10 +1291,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
tInsuranceSettleService
.
save
(
settle
);
detail
.
setDefaultSettleId
(
settle
.
getId
());
successList
.
add
(
detail
);
if
(
detail
.
getBuyType
()
!=
CommonConstants
.
FOUR_INT
)
{
//生成收入数据
createInsuranceInfo
(
detail
);
}
}
else
{
//按天
//计算起止时间的天数
...
...
@@ -1331,12 +1325,10 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
tInsuranceSettleService
.
save
(
settle
);
detail
.
setDefaultSettleId
(
settle
.
getId
());
successList
.
add
(
detail
);
if
(
detail
.
getBuyType
()
!=
CommonConstants
.
FOUR_INT
)
{
//生成收入数据
createInsuranceInfo
(
detail
);
}
}
}
//实缴
if
(
detail
.
getSettleType
()
==
CommonConstants
.
ONE_INT
){
if
(
detail
.
getBuyType
()
==
CommonConstants
.
THREE_INT
){
...
...
@@ -2879,7 +2871,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
Map
<
String
,
List
<
InsuranceRegisterParam
>>
map
=
new
HashMap
<>();
List
<
InsuranceRegisterParam
>
listResult
=
new
ArrayList
<>();
List
<
InsuranceRegisterParam
>
listSuccess
=
new
ArrayList
<>();
String
regionSQL
=
getRegionSQL
(
user
);
for
(
InsuranceRegisterParam
param
:
paramList
.
stream
().
distinct
().
collect
(
Collectors
.
toList
()))
{
// 必填校验
if
(
StringUtils
.
isBlank
(
param
.
getEmpName
())){
...
...
@@ -2960,13 +2951,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
listResult
.
add
(
param
);
continue
;
}
else
{
//查数据是否存在权限范围内
TInsuranceDetail
detailByRegionSQL
=
this
.
baseMapper
.
selectByRegionSql
(
regionSQL
,
detail
.
getId
());
if
(!
Optional
.
ofNullable
(
detailByRegionSQL
).
isPresent
()){
param
.
setErrorMessage
(
InsurancesConstants
.
NO_UPDATE_DETAIL_JURISDICTION
);
listResult
.
add
(
param
);
continue
;
}
// 如果保费不存在,保单号、保费必填
if
(
detail
.
getActualPremium
()
==
null
){
if
(
StringUtils
.
isBlank
(
param
.
getPolicyNo
())){
...
...
@@ -3351,6 +3335,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
@Override
public
IPage
<
InsuredListVo
>
getInsuredListPage
(
Page
<
InsuredListVo
>
page
,
InsuredParam
param
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
menuUtil
.
setAuthSql
(
user
,
param
);
List
<
String
>
deptList
=
getDeptNoList
(
user
);
IPage
<
InsuredListVo
>
insuranceList
=
new
Page
<>();
if
(
CollectionUtils
.
isEmpty
(
deptList
)){
...
...
@@ -3434,6 +3419,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
@Override
public
R
getInsuranceRefundPageList
(
Page
<
InsuranceRefundParam
>
page
,
InsuranceRefundParam
param
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
menuUtil
.
setAuthSql
(
user
,
param
);
List
<
String
>
deptList
=
getDeptNoList
(
user
);
if
(
CollectionUtils
.
isEmpty
(
deptList
)){
return
R
.
ok
(
"当前登录人无任何项目权限"
);
...
...
@@ -3515,13 +3501,12 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
@Override
public
IPage
<
RefundExportListVo
>
getInsuranceRefundHandlingPageList
(
Page
<
InsuranceRefundHandlingParam
>
page
,
InsuranceRefundHandlingParam
param
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
menuUtil
.
setAuthSql
(
user
,
param
);
String
id
=
user
.
getId
();
Integer
reduceHandleStatus
=
param
.
getReduceHandleStatus
();
if
(
null
!=
reduceHandleStatus
&&
reduceHandleStatus
!=
CommonConstants
.
ONE_INT
){
param
.
setUpdateBy
(
id
);
}
String
regionSQL
=
getRegionSQL
(
user
);
param
.
setRegionSql
(
regionSQL
);
IPage
<
RefundExportListVo
>
insuranceRefundHandlingPageList
=
this
.
baseMapper
.
getInsuranceRefundHandlingPageList
(
page
,
param
);
if
(
CollectionUtils
.
isNotEmpty
(
insuranceRefundHandlingPageList
.
getRecords
())){
//根据项目编码获取项目名称
...
...
@@ -3554,9 +3539,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
@Transactional
(
value
=
"insurancesTransactionManager"
,
rollbackFor
=
{
Exception
.
class
})
public
R
getInsuranceRefundHandlingList
(
RefundExportListParam
param
){
YifuUser
user
=
SecurityUtils
.
getUser
();
menuUtil
.
setAuthSql
(
user
,
param
);
List
<
RefundExportListVo
>
refundExportList
;
String
regionSQL
=
getRegionSQL
(
user
);
param
.
setRegionSql
(
regionSQL
);
//如勾选项不为空,则导出勾选记录;否则导出当前筛选条件下 && 「待减员」的结果集
if
(
CollectionUtils
.
isNotEmpty
(
param
.
getIdList
())){
refundExportList
=
baseMapper
.
getRefundExportListBySelect
(
param
.
getIdList
());
...
...
@@ -5298,14 +5282,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
continue
;
}
String
detailId
=
insuranceDetail
.
getId
();
//查数据是否存在权限范围内
String
regionSQL
=
getRegionSQL
(
user
);
TInsuranceDetail
detailByRegionSQL
=
this
.
baseMapper
.
selectByRegionSql
(
regionSQL
,
detailId
);
if
(!
Optional
.
ofNullable
(
detailByRegionSQL
).
isPresent
()
||
!
user
.
getId
().
equals
(
detailByRegionSQL
.
getUpdateBy
())){
param
.
setErrorMessage
(
InsurancesConstants
.
NO_DETAIL_JURISDICTION
);
errorList
.
add
(
param
);
continue
;
}
if
(
flag
){
//减员办理
//投保办理状态
...
...
@@ -5902,32 +5878,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
return
deptList
;
}
/**
* 获取地市权限
*
* @author zhaji
* @param user
* @return {@link String}
*/
public
String
getRegionSQL
(
YifuUser
user
){
//todo 根据登录人获取其办理地SQL
String
id
=
user
.
getId
();
String
sql
;
//user_id=14, 合肥办理1
//user_id=15,合肥办理2
//user_id=16,上海办理
if
(
CommonConstants
.
FOURTEEN_STRING
.
equals
(
id
)){
sql
=
"detail.INSURANCE_HANDLE_PROVINCE in (12) and detail.INSURANCE_HANDLE_CITY in (135)"
;
}
else
if
(
CommonConstants
.
FIFTEEN_STRING
.
equals
(
id
)){
sql
=
"detail.INSURANCE_HANDLE_PROVINCE in (12) and detail.INSURANCE_HANDLE_CITY in (135)"
;
}
else
if
(
CommonConstants
.
SIXTEEN_STRING
.
equals
(
id
)){
sql
=
"detail.INSURANCE_HANDLE_PROVINCE in (9) and detail.INSURANCE_HANDLE_CITY in (109)"
;
}
else
{
sql
=
"detail.INSURANCE_HANDLE_PROVINCE in (12,9) and detail.INSURANCE_HANDLE_CITY in (135,109)"
;
}
return
sql
;
}
/**
* 获取项目名称,客户编码,客户名称
*
...
...
@@ -6114,10 +6064,16 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
incomeDetail
.
setSourceType
(
CommonConstants
.
THREE_STRING
);
R
<
TIncomeDetailReturnVo
>
detailList
=
socialDaprUtils
.
getTIncomeDetailList
(
incomeDetail
);
if
(
Common
.
isNotNull
(
detailList
)
&&
detailList
.
getCode
()
==
CommonConstants
.
SUCCESS
&&
detailList
.
getData
().
getDetailList
().
size
()
>
0
){
&&
!
detailList
.
getData
().
getDetailList
().
isEmpty
()
){
incomeDetailList
=
detailList
.
getData
().
getDetailList
();
BigDecimal
sumMoney
=
BigDecimal
.
ZERO
;
for
(
TIncomeDetail
income
:
incomeDetailList
)
{
sumMoney
=
BigDecimalUtils
.
safeAdd
(
income
.
getMoney
(),
sumMoney
);
}
if
(
sumMoney
.
compareTo
(
BigDecimal
.
ZERO
)
>
0
)
{
isExist
=
true
;
}
}
//预估或者实缴保费
BigDecimal
fee
;
...
...
yifu-insurances/yifu-insurances-biz/src/main/resources/mapper/insurances/TInsuranceDetailMapper.xml
View file @
444af7e0
...
...
@@ -95,6 +95,9 @@
detail.SETTLE_MONTH as settleMonth
from t_insurance_detail detail
where detail.DELETE_FLAG = 0
<if
test=
"param.authSql != null and param.authSql.trim() != ''"
>
left join t_insurance_area_res p on detail.CREATE_BY=p.USER_ID
</if>
<if
test=
"param.deptNo != null and param.deptNo.trim() != ''"
>
and detail.DEPT_NO = #{param.deptNo}
</if>
...
...
@@ -137,6 +140,10 @@
<if
test=
"param.startDate != null and param.startDate.trim() != '' and param.endDate != null and param.endDate.trim() != ''"
>
and detail.CREATE_TIME
<![CDATA[ >= ]]>
concat(#{param.startDate}, ' 00:00:00') and detail.CREATE_TIME
<![CDATA[ <= ]]>
concat(#{param.endDate}, ' 23:59:59')
</if>
<if
test=
"param.authSql != null and param.authSql.trim() != ''"
>
${param.authSql}
</if>
GROUP BY detail.id
ORDER BY detail.BUY_HANDLE_STATUS,detail.CREATE_TIME DESC
</select>
<!--投保不分页查询-->
...
...
@@ -218,6 +225,9 @@
detail.SETTLE_TYPE as settleType,
detail.SETTLE_MONTH as settleMonth
from t_insurance_detail detail
<if
test=
"param.authSql != null and param.authSql.trim() != ''"
>
left join t_insurance_area_res p on detail.CREATE_BY=p.USER_ID
</if>
where detail.DELETE_FLAG = 0
<if
test=
"param.deptNo != null and param.deptNo.trim() != ''"
>
and detail.DEPT_NO = #{param.deptNo}
...
...
@@ -243,9 +253,6 @@
#{item}
</foreach>
</if>
<if
test=
"param.regionSql != null and param.regionSql.trim() != ''"
>
and ${param.regionSql}
</if>
<if
test=
"param.updateBy != null and param.updateBy.trim() != ''"
>
and detail.HANDLED_BY = #{param.updateBy}
</if>
...
...
@@ -258,6 +265,10 @@
<if
test=
"param.startDate != null and param.startDate.trim() != '' and param.endDate != null and param.endDate.trim() != ''"
>
and detail.CREATE_TIME
<![CDATA[ >= ]]>
concat(#{param.startDate}, ' 00:00:00') and detail.CREATE_TIME
<![CDATA[ <= ]]>
concat(#{param.endDate}, ' 23:59:59')
</if>
<if
test=
"param.authSql != null and param.authSql.trim() != ''"
>
${param.authSql}
</if>
GROUP BY detail.id
ORDER BY detail.BUY_HANDLE_STATUS,detail.CREATE_TIME DESC
</select>
<!--通过id查询商险信息-->
...
...
@@ -365,6 +376,9 @@
detail.POLICY_NO as policyNo,
detail.REMARK as remark
from t_insurance_detail detail
<if
test=
"param.authSql != null and param.authSql.trim() != ''"
>
left join t_insurance_area_res p on detail.CREATE_BY=p.USER_ID
</if>
where detail.DELETE_FLAG = 0 and detail.BUY_HANDLE_STATUS = 1
<if
test=
"param.empName != null and param.empName.trim() != ''"
>
and detail.EMP_NAME like concat('%',replace(replace(#{param.empName},'_','\_'),'%','\%'),'%')
...
...
@@ -378,9 +392,6 @@
<if
test=
"param.insuranceCompanyName != null and param.insuranceCompanyName.trim() != ''"
>
and detail.INSURANCE_COMPANY_NAME like concat('%',replace(replace(#{param.insuranceCompanyName},'_','\_'),'%','\%'),'%')
</if>
<if
test=
"param.regionSql != null and param.regionSql.trim() != ''"
>
and ${param.regionSql}
</if>
<if
test=
"param.buyType != null"
>
and detail.BUY_TYPE = #{param.buyType}
</if>
...
...
@@ -390,6 +401,10 @@
<if
test=
"param.startDate != null and param.startDate.trim() != '' and param.endDate != null and param.endDate.trim() != ''"
>
and detail.CREATE_TIME
<![CDATA[ >= ]]>
concat(#{param.startDate}, ' 00:00:00') and detail.CREATE_TIME
<![CDATA[ <= ]]>
concat(#{param.endDate}, ' 23:59:59')
</if>
<if
test=
"param.authSql != null and param.authSql.trim() != ''"
>
${param.authSql}
</if>
GROUP BY detail.id
ORDER BY detail.CREATE_TIME DESC
</select>
<!--批量更新保单号-->
...
...
@@ -428,6 +443,9 @@
detail.BUY_STANDARD as buyStandard
from
t_insurance_detail detail
<if
test=
"param.authSql != null and param.authSql.trim() != ''"
>
left join t_insurance_area_res p on detail.CREATE_BY=p.USER_ID
</if>
where
detail.DELETE_FLAG = 0
and
...
...
@@ -481,6 +499,10 @@
<if
test=
"param.createEndTime != null and param.createEndTime.trim() != ''"
>
AND detail.CREATE_TIME
<![CDATA[ <= ]]>
concat(#{param.createEndTime}, ' 23:59:59')
</if>
<if
test=
"param.authSql != null and param.authSql.trim() != ''"
>
${param.authSql}
</if>
GROUP BY detail.id
ORDER BY detail.CREATE_TIME DESC ,detail.ID ASC
</select>
<!-- 已投保列表不分页查询-->
...
...
@@ -587,6 +609,9 @@
from
t_insurance_detail detail,
t_insurance_refund refund
<if
test=
"param.authSql != null and param.authSql.trim() != ''"
>
left join t_insurance_area_res p on detail.CREATE_BY=p.USER_ID
</if>
where
detail.DELETE_FLAG = 0
and
...
...
@@ -627,6 +652,10 @@
(detail.POLICY_END
<![CDATA[ >= ]]>
concat(#{param.policyStart}, ' 00:00:00') and detail.POLICY_END
<![CDATA[ <= ]]>
concat(#{param.policyEnd}, ' 23:59:59'))
)
</if>
<if
test=
"param.authSql != null and param.authSql.trim() != ''"
>
${param.authSql}
</if>
GROUP BY detail.id
ORDER BY refund.CREATE_TIME DESC,detail.ID ASC
</select>
<!-- 已减员列表不分页查询-->
...
...
@@ -721,6 +750,9 @@
from
t_insurance_detail detail,
t_insurance_refund refund
<if
test=
"param.authSql != null and param.authSql.trim() != ''"
>
left join t_insurance_area_res p on detail.CREATE_BY=p.USER_ID
</if>
where
detail.REFUND_ID = refund.ID
<if
test=
"param.empName != null and param.empName.trim() != ''"
>
...
...
@@ -741,9 +773,6 @@
<if
test=
"param.insuranceCompanyName != null and param.insuranceCompanyName.trim() != ''"
>
and detail.INSURANCE_COMPANY_NAME = #{param.insuranceCompanyName}
</if>
<if
test=
"param.regionSql != null and param.regionSql.trim() != ''"
>
and ${param.regionSql}
</if>
<if
test=
"param.updateBy != null and param.updateBy.trim() != ''"
>
and refund.UPDATE_BY = #{param.updateBy}
</if>
...
...
@@ -756,6 +785,10 @@
<if
test=
"param.endDate != null and param.endDate.trim() != ''"
>
AND refund.CREATE_TIME
<![CDATA[ <= ]]>
concat(#{param.endDate}, ' 23:59:59')
</if>
<if
test=
"param.authSql != null and param.authSql.trim() != ''"
>
${param.authSql}
</if>
GROUP BY detail.id
ORDER BY refund.CREATE_TIME DESC,detail.ID ASC
</select>
<!-- 查询保单列表-->
...
...
@@ -861,6 +894,9 @@
detail.REMARK as remark
from
t_insurance_detail detail
<if
test=
"param.authSql != null and param.authSql.trim() != ''"
>
left join t_insurance_area_res p on detail.CREATE_BY=p.USER_ID
</if>
where
detail.DELETE_FLAG = 0 and detail.REDUCE_HANDLE_STATUS = 1
<if
test=
"param.empName != null and param.empName.trim() != ''"
>
...
...
@@ -878,9 +914,10 @@
<if
test=
"param.insuranceCompanyName != null and param.insuranceCompanyName.trim() != ''"
>
and detail.INSURANCE_COMPANY_NAME = #{param.insuranceCompanyName}
</if>
<if
test=
"param.
regionSql != null and param.region
Sql.trim() != ''"
>
and ${param.region
Sql}
<if
test=
"param.
authSql != null and param.auth
Sql.trim() != ''"
>
${param.auth
Sql}
</if>
GROUP BY detail.id
ORDER BY detail.CREATE_TIME DESC
</select>
<!-- 减员办理-->
...
...
@@ -926,20 +963,6 @@
</where>
ORDER BY CREATE_TIME desc
</select>
<!--查数据是否存在权限范围内-->
<select
id=
"selectByRegionSql"
resultType=
"com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail"
>
SELECT
<include
refid=
"Base_Column_List"
/>
FROM
t_insurance_detail detail
<where>
detail.ID = #{id}
<if
test=
"regionSql != null and regionSql.trim() != ''"
>
and ${regionSql}
</if>
</where>
ORDER BY CREATE_TIME desc
</select>
<!--商险订单列表查询-->
<select
id=
"getOrderInsuredListPage"
resultType=
"com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuredOrderListVo"
>
(
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/SalaryUploadServiceImpl.java
View file @
444af7e0
...
...
@@ -197,7 +197,7 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
}
}
}
catch
(
Exception
e
)
{
log
.
error
(
e
.
getMessage
()
);
log
.
error
(
"薪资导入异常:"
,
e
);
return
R
.
failed
(
"数据导入解析失败!"
);
}
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/THaveSalaryNosocialServiceImpl.java
View file @
444af7e0
...
...
@@ -185,7 +185,7 @@ public class THaveSalaryNosocialServiceImpl extends ServiceImpl<THaveSalaryNosoc
List
<
THaveSalaryNoSocialExportVo
>
list
=
new
ArrayList
<>();
// TODO
List
<
String
>
settleDomainIds
=
null
;
List
<
String
>
ids
=
null
;
List
<
String
>
ids
=
Common
.
getList
(
searchVo
.
getIds
())
;
String
sql
=
null
;
int
count
=
noPageCountDiy
(
searchVo
,
settleDomainIds
,
ids
,
sql
);
ServletOutputStream
out
=
null
;
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/TSalaryAccountServiceImpl.java
View file @
444af7e0
...
...
@@ -23,6 +23,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.BigDecimalUtils
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.Common
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.DateUtil
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.ExcelUtil
;
...
...
@@ -95,6 +96,10 @@ public class TSalaryAccountServiceImpl extends ServiceImpl<TSalaryAccountMapper,
if
(
Common
.
isNotNull
(
list
))
{
ExcelUtil
<
TSalaryAccount
>
util
=
new
ExcelUtil
<>(
TSalaryAccount
.
class
);
for
(
TSalaryAccount
vo
:
list
)
{
if
(
CommonConstants
.
THREE_STRING
.
equals
(
vo
.
getFormType
())){
vo
.
setRelaySalary
(
vo
.
getRelaySalaryUnit
());
vo
.
setSalaryTax
(
BigDecimalUtils
.
safeAdd
(
vo
.
getSalaryTax
(),
vo
.
getSalaryTaxUnit
()));
}
util
.
convertEntity
(
vo
,
null
,
null
,
null
);
}
}
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TForecastLibraryServiceImpl.java
View file @
444af7e0
...
...
@@ -317,6 +317,13 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
,
fundHistoryMap
,
socialPushMap
,
fundPushMap
,
saveLibraryMap
,
isReduceSocial
,
isReduceFund
,
false
);
if
(
coreR
!=
null
)
return
coreR
;
boolean
isSaveAndUpdate
=
false
;
TSocialFundInfo
socialFundInfo
;
TSocialFundInfo
socialFundInfoF
;
List
<
TForecastLibrary
>
libraryFundInfoListSocial
=
new
ArrayList
<>();
List
<
TForecastLibrary
>
libraryFundInfoListFund
=
new
ArrayList
<>();
for
(
TForecastLibrary
library
:
saveLibraryMap
.
values
())
{
if
(
Common
.
isEmpty
(
library
.
getSocialId
())
&&
Common
.
isEmpty
(
library
.
getProvidentId
()))
{
continue
;
...
...
@@ -333,30 +340,40 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
}
}
//生成社保收入
TSocialFundInfo
socialFundInfo
=
socialFundInfoMapper
.
selectOne
(
Wrappers
.<
TSocialFundInfo
>
query
().
lambda
()
socialFundInfo
=
socialFundInfoMapper
.
selectOne
(
Wrappers
.<
TSocialFundInfo
>
query
().
lambda
()
.
eq
(
TSocialFundInfo:
:
getEmpIdcard
,
empIdCard
)
.
eq
(
TSocialFundInfo:
:
getSettleDomain
,
library
.
getSettleDomainId
())
.
eq
(
TSocialFundInfo:
:
getSocialHousehold
,
library
.
getSocialHousehold
()));
if
(
Common
.
isNotNull
(
socialFundInfo
))
{
if
(
Common
.
isNotNull
(
socialFundInfo
.
getSocialId
())
if
(
Common
.
isNotNull
(
socialFundInfo
)
&&
(
Common
.
isNotNull
(
socialFundInfo
.
getSocialId
())
&&
CommonConstants
.
FOUR_STRING
.
equals
(
socialFundInfo
.
getSocialStatus
())
||
CommonConstants
.
THREE_STRING
.
equals
(
socialFundInfo
.
getSocialStatus
(
)))
{
||
CommonConstants
.
THREE_STRING
.
equals
(
socialFundInfo
.
getSocialStatus
()
)))
{
//办理成功生成收入
createIncomeInfo
(
library
);
if
(
CommonConstants
.
ZERO_INT
==
library
.
getDataPush
())
{
libraryFundInfoListSocial
.
add
(
library
);
}
}
//生成公积金收入
TSocialFundInfo
socialFundInfoF
=
socialFundInfoMapper
.
selectOne
(
Wrappers
.<
TSocialFundInfo
>
query
().
lambda
()
socialFundInfoF
=
socialFundInfoMapper
.
selectOne
(
Wrappers
.<
TSocialFundInfo
>
query
().
lambda
()
.
eq
(
TSocialFundInfo:
:
getEmpIdcard
,
empIdCard
)
.
eq
(
TSocialFundInfo:
:
getSettleDomain
,
library
.
getSettleDomainId
())
.
eq
(
TSocialFundInfo:
:
getProvidentHousehold
,
library
.
getProvidentHousehold
()));
if
(
Common
.
isNotNull
(
socialFundInfoF
))
{
if
(
Common
.
isNotNull
(
socialFundInfoF
.
getFundId
())
&&
CommonConstants
.
THREE_STRING
.
equals
(
socialFundInfoF
.
getFundStatus
()))
{
if
(
Common
.
isNotNull
(
socialFundInfoF
)
&&
(
Common
.
isNotNull
(
socialFundInfoF
.
getFundId
())
&&
CommonConstants
.
THREE_STRING
.
equals
(
socialFundInfoF
.
getFundStatus
())))
{
//办理成功生成收入
createIncomeInfo
(
library
);
if
(
CommonConstants
.
ZERO_INT
==
library
.
getDataPush
())
{
libraryFundInfoListFund
.
add
(
library
);
}
}
}
//推送社保明细
if
(
Common
.
isNotNull
(
libraryFundInfoListSocial
))
{
pushForecastInfo
(
libraryFundInfoListSocial
);
}
//推送公积金明细
if
(
Common
.
isNotNull
(
libraryFundInfoListFund
))
{
pushForecastFundInfo
(
libraryFundInfoListFund
);
}
if
(
isSaveAndUpdate
)
{
return
R
.
ok
(
null
,
"执行成功!"
);
...
...
@@ -1498,6 +1515,8 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
@Override
public
R
<
String
>
updateForecastLibaryByDispatchReduce
(
TSocialFundInfo
socialFundInfo
,
int
forecastFlag
)
{
String
empIdCard
=
socialFundInfo
.
getEmpIdcard
();
List
<
TForecastLibrary
>
libraryFundInfoListSocial
=
new
ArrayList
<>();
List
<
TForecastLibrary
>
libraryFundInfoListFund
=
new
ArrayList
<>();
if
(
Common
.
isNotNull
(
empIdCard
))
{
Date
minStartDate
=
this
.
getMinSocialDate
(
socialFundInfo
);
BigDecimal
zero
=
BigDecimal
.
ZERO
;
...
...
@@ -1514,11 +1533,11 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
if
(
socialReduceDate
!=
null
)
{
// 存在社保派减且处于派减期间内,未被预估结算,工资结算引用则清空相关数据
if
(
DateUtil
.
formatDateInt
(
socialReduceDate
)
<=
Integer
.
parseInt
(
library
.
getSocialPayMonth
()))
{
this
.
calculateSocialType
(
zero
,
library
);
this
.
calculateSocialType
(
zero
,
library
,
libraryFundInfoListSocial
);
}
}
else
{
if
(
DateUtil
.
formatDateInt
(
minStartDate
)
<=
Integer
.
parseInt
(
library
.
getSocialPayMonth
()))
{
this
.
calculateSocialType
(
zero
,
library
);
this
.
calculateSocialType
(
zero
,
library
,
libraryFundInfoListSocial
);
}
}
}
...
...
@@ -1539,22 +1558,30 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
if
(
fundReduceDate
!=
null
)
{
// 存在社保派减且处于派减期间内,未被预估结算,工资结算引用则清空相关数据
if
(
DateUtil
.
formatDateInt
(
fundReduceDate
)
<=
Integer
.
parseInt
(
library
.
getProvidentPayMonth
()))
{
this
.
calculateFundType
(
zero
,
library
);
this
.
calculateFundType
(
zero
,
library
,
libraryFundInfoListFund
);
}
}
else
{
if
(
DateUtil
.
formatDateInt
(
minStartDate
)
<=
Integer
.
parseInt
(
library
.
getProvidentPayMonth
()))
{
this
.
calculateFundType
(
zero
,
library
);
this
.
calculateFundType
(
zero
,
library
,
libraryFundInfoListFund
);
}
}
}
}
}
}
//推送社保明细
if
(
Common
.
isNotNull
(
libraryFundInfoListSocial
))
{
pushForecastInfo
(
libraryFundInfoListSocial
);
}
//推送公积金明细
if
(
Common
.
isNotNull
(
libraryFundInfoListFund
))
{
pushForecastFundInfo
(
libraryFundInfoListFund
);
}
}
return
R
.
ok
();
}
private
void
calculateSocialType
(
BigDecimal
zero
,
TForecastLibrary
library
)
{
private
void
calculateSocialType
(
BigDecimal
zero
,
TForecastLibrary
library
,
List
<
TForecastLibrary
>
libraryFundInfoListSocial
)
{
if
(
library
.
getDataPush
()
==
CommonConstants
.
ONE_INT
||
CommonConstants
.
ONE_STRING
.
equals
(
library
.
getSalarySocialFlag
()))
{
// 加负数
TForecastLibrary
negateLib
=
new
TForecastLibrary
();
...
...
@@ -1580,6 +1607,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
negateLib
.
setSumAll
(
BigDecimalUtils
.
safeSubtract
(
false
,
zero
,
library
.
getSumAll
()));
negateLib
.
setDiffType
(
SocialConstants
.
DIFF_TYPE_TWO
);
baseMapper
.
insert
(
negateLib
);
libraryFundInfoListSocial
.
add
(
negateLib
);
}
else
{
// 删除
baseMapper
.
deleteById
(
library
.
getId
());
...
...
@@ -1603,7 +1631,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
}
}
private
void
calculateFundType
(
BigDecimal
zero
,
TForecastLibrary
library
)
{
private
void
calculateFundType
(
BigDecimal
zero
,
TForecastLibrary
library
,
List
<
TForecastLibrary
>
libraryFundInfoListFund
)
{
if
(
library
.
getDataPush
()
==
CommonConstants
.
ONE_INT
||
CommonConstants
.
ONE_STRING
.
equals
(
library
.
getSalaryFundFlag
()))
{
// 加负数
TForecastLibrary
negateLib
=
new
TForecastLibrary
();
...
...
@@ -1618,6 +1646,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
negateLib
.
setSumAll
(
BigDecimalUtils
.
safeSubtract
(
false
,
zero
,
library
.
getSumAll
()));
negateLib
.
setDiffType
(
SocialConstants
.
DIFF_TYPE_TWO
);
baseMapper
.
insert
(
negateLib
);
libraryFundInfoListFund
.
add
(
negateLib
);
}
else
{
// 删除
baseMapper
.
deleteById
(
library
.
getId
());
...
...
@@ -2192,13 +2221,15 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
isSaveAndUpdate
=
true
;
}
List
<
TForecastLibrary
>
libraryFundInfoListSocial
=
new
ArrayList
<>();
List
<
TForecastLibrary
>
libraryFundInfoListFund
=
new
ArrayList
<>();
//社保收入
if
(
Common
.
isNotNull
(
socialFundInfo
.
getSocialId
())
&&
CommonConstants
.
FOUR_STRING
.
equals
(
socialFundInfo
.
getSocialStatus
())
||
CommonConstants
.
THREE_STRING
.
equals
(
socialFundInfo
.
getSocialStatus
()))
{
//获取所有的预估数据
List
<
TForecastLibrary
>
librarySocialInfoList
=
null
;
List
<
TForecastLibrary
>
librarySocialInfoList
;
librarySocialInfoList
=
baseMapper
.
selectList
(
Wrappers
.<
TForecastLibrary
>
query
().
lambda
()
.
eq
(
TForecastLibrary:
:
getEmpIdcard
,
empIdCard
)
.
eq
(
TForecastLibrary:
:
getSettleDomainId
,
socialFundInfo
.
getSettleDomain
())
...
...
@@ -2208,6 +2239,9 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
for
(
TForecastLibrary
library
:
librarySocialInfoList
)
{
//办理成功生成收入
createIncomeInfo
(
library
);
if
(
CommonConstants
.
ZERO_INT
==
library
.
getDataPush
())
{
libraryFundInfoListSocial
.
add
(
library
);
}
}
}
}
...
...
@@ -2217,7 +2251,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
&&
CommonConstants
.
THREE_STRING
.
equals
(
socialFundInfo
.
getFundStatus
()))
{
//获取所有的预估数据
List
<
TForecastLibrary
>
libraryFundInfoList
=
null
;
List
<
TForecastLibrary
>
libraryFundInfoList
;
libraryFundInfoList
=
baseMapper
.
selectList
(
Wrappers
.<
TForecastLibrary
>
query
().
lambda
()
.
eq
(
TForecastLibrary:
:
getEmpIdcard
,
empIdCard
)
.
eq
(
TForecastLibrary:
:
getSettleDomainId
,
socialFundInfo
.
getSettleDomain
())
...
...
@@ -2227,8 +2261,19 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
for
(
TForecastLibrary
library
:
libraryFundInfoList
)
{
//办理成功生成收入
createIncomeInfo
(
library
);
if
(
CommonConstants
.
ZERO_INT
==
library
.
getDataPush
())
{
libraryFundInfoListFund
.
add
(
library
);
}
}
}
}
//推送社保明细
if
(
Common
.
isNotNull
(
libraryFundInfoListSocial
))
{
pushForecastInfo
(
libraryFundInfoListSocial
);
}
//推送公积金明细
if
(
Common
.
isNotNull
(
libraryFundInfoListFund
))
{
pushForecastFundInfo
(
libraryFundInfoListFund
);
}
if
(
isSaveAndUpdate
)
{
return
R
.
ok
(
null
,
"执行成功!"
);
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TPreDispatchInfoServiceImpl.java
View file @
444af7e0
...
...
@@ -1172,12 +1172,12 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
}
// 默认合同名称为代理社保 合同类型为其他
info
.
setContractNameAdd
(
PreDispatchConstants
.
CONTRACT_NAME
);
info
.
setContractTypeAdd
(
CommonConstants
.
THRE
E_STRING
);
info
.
setContractStartAdd
(
info
.
getContractStart
(
));
info
.
setContractTypeAdd
(
CommonConstants
.
ON
E_STRING
);
info
.
setContractStartAdd
(
DateUtil
.
getFirstDayString
(
info
.
getPensionStart
()
));
// 默认为开始时间后的两年时间
info
.
setContractEndAdd
(
info
.
getContractEnd
(
));
info
.
setContractEndAdd
(
DateUtil
.
getFirstDayString
(
DateUtil
.
getYearAndMonth
(
info
.
getPensionStart
(),
24
)
));
// 默认合同期限2年
info
.
setContractTermAdd
(
Integer
.
toString
(
Common
.
getYearOfTime
(
info
.
getContractStart
(),
info
.
getContractEnd
()))
);
info
.
setContractTermAdd
(
CommonConstants
.
TWO_STRING
);
// 默认工时制 综合工时制2
info
.
setWorkingHoursAdd
(
CommonConstants
.
TWO_STRING
);
...
...
yifu-upms/yifu-upms-biz/src/main/java/com/yifu.cloud.plus.v1/yifu/admin/service/impl/SysDeptServiceImpl.java
View file @
444af7e0
...
...
@@ -191,7 +191,7 @@ public class SysDeptServiceImpl extends ServiceImpl<SysDeptMapper, SysDept> impl
List
<
String
>
dnList
=
sysDeptMapper
.
selectDnList
();
List
<
String
>
delList
=
dnList
.
stream
().
filter
(
p
->
!
entryDnList
.
contains
(
p
)).
collect
(
Collectors
.
toList
());
//删除ldap中不存在的dn的数据
if
(
delList
.
size
()
>
0
)
{
if
(
!
delList
.
isEmpty
()
)
{
sysDeptMapper
.
delete
(
Wrappers
.<
SysDept
>
query
().
lambda
().
in
(
SysDept:
:
getDeptDn
,
delList
));
}
List
<
Map
<
String
,
Object
>>
updUserList
=
new
ArrayList
<>();
...
...
@@ -202,7 +202,7 @@ public class SysDeptServiceImpl extends ServiceImpl<SysDeptMapper, SysDept> impl
userId
=
dn
.
substring
(
4
,
dn
.
indexOf
(
","
,
1
));
dn
=
dn
.
substring
(
dn
.
indexOf
(
","
,
1
)
+
1
);
}
List
<
String
>
saveDnList
=
Arrays
.
asList
(
dn
.
split
(
","
)).
stream
(
).
filter
(
e
->
(
e
.
contains
(
"ou="
)
&&
!
e
.
equals
(
"ou=wanxin"
))).
collect
(
Collectors
.
toList
());
List
<
String
>
saveDnList
=
Arrays
.
stream
(
dn
.
split
(
","
)
).
filter
(
e
->
(
e
.
contains
(
"ou="
)
&&
!
e
.
equals
(
"ou=wanxin"
))).
collect
(
Collectors
.
toList
());
String
deptName
=
saveDnList
.
get
(
0
).
replace
(
"ou="
,
""
);
int
size
=
saveDnList
.
size
();
if
(
size
==
1
)
{
...
...
@@ -220,7 +220,7 @@ public class SysDeptServiceImpl extends ServiceImpl<SysDeptMapper, SysDept> impl
sysDept
.
setName
(
deptName
);
this
.
updateDeptById
(
sysDept
);
}
}
else
if
(
size
>=
2
)
{
}
else
{
try
{
SysDept
sysDept
=
this
.
getOne
(
Wrappers
.<
SysDept
>
query
().
lambda
().
eq
(
SysDept:
:
getDeptDn
,
dn
.
substring
(
dn
.
indexOf
(
"ou="
,
2
),
dn
.
length
())));
if
(
null
!=
sysDept
)
{
...
...
yifu-upms/yifu-upms-biz/src/main/java/com/yifu.cloud.plus.v1/yifu/admin/service/impl/SysUserServiceImpl.java
View file @
444af7e0
...
...
@@ -380,8 +380,6 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
// 根据角色名称查询角色ID
List
<
Long
>
roleIdList
=
roleCollList
.
stream
().
map
(
SysRole:
:
getRoleId
).
collect
(
Collectors
.
toList
());
userDTO
.
setRole
(
roleIdList
);
// List<Long> postIdList = postCollList.stream().map(SysPost::getPostId).collect(Collectors.toList());
// userDTO.setPost(postIdList);
// 插入用户
this
.
saveUser
(
userDTO
);
}
...
...
@@ -433,10 +431,10 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
insertList
.
add
(
personVo
);
}
}
if
(
updateList
.
size
()
>
0
)
{
if
(
!
updateList
.
isEmpty
()
)
{
sysUserMapper
.
batchUpdateUser
(
updateList
);
}
if
(
insertList
.
size
()
>
0
)
{
if
(
!
insertList
.
isEmpty
()
)
{
sysUserMapper
.
batchInsertUser
(
insertList
);
}
}
...
...
@@ -447,7 +445,7 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
List
<
String
>
dnList
=
sysDeptMapper
.
selectDnList
();
List
<
String
>
delList
=
dnList
.
stream
().
filter
(
p
->
!
entryDnList
.
contains
(
p
)).
collect
(
Collectors
.
toList
());
//删除ldap中不存在的dn的数据
if
(
delList
.
size
()
>
0
)
{
if
(
!
delList
.
isEmpty
()
)
{
sysDeptMapper
.
delete
(
Wrappers
.<
SysDept
>
query
().
lambda
().
in
(
SysDept:
:
getDeptDn
,
delList
));
}
List
<
Map
<
String
,
Object
>>
updUserList
=
new
ArrayList
<>();
...
...
@@ -458,7 +456,7 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
userId
=
dn
.
substring
(
4
,
dn
.
indexOf
(
","
,
1
));
dn
=
dn
.
substring
(
dn
.
indexOf
(
","
,
1
)
+
1
);
}
List
<
String
>
saveDnList
=
Arrays
.
asList
(
dn
.
split
(
","
)).
stream
(
).
filter
(
e
->
(
e
.
contains
(
"ou="
)
&&
!
e
.
equals
(
"ou=wanxin"
))).
collect
(
Collectors
.
toList
());
List
<
String
>
saveDnList
=
Arrays
.
stream
(
dn
.
split
(
","
)
).
filter
(
e
->
(
e
.
contains
(
"ou="
)
&&
!
e
.
equals
(
"ou=wanxin"
))).
collect
(
Collectors
.
toList
());
String
deptName
=
saveDnList
.
get
(
0
).
replace
(
"ou="
,
""
);
int
size
=
saveDnList
.
size
();
if
(
size
==
1
)
{
...
...
@@ -476,7 +474,7 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
sysDept
.
setName
(
deptName
);
sysDeptMapper
.
updateById
(
sysDept
);
}
}
else
if
(
size
>=
2
)
{
}
else
{
SysDept
sysDept
=
sysDeptMapper
.
selectOne
(
Wrappers
.<
SysDept
>
query
().
lambda
().
eq
(
SysDept:
:
getDeptDn
,
dn
.
substring
(
dn
.
indexOf
(
"ou="
,
2
),
dn
.
length
())));
if
(
null
!=
sysDept
)
{
SysDept
sysDeptCount
=
sysDeptMapper
.
selectOne
(
Wrappers
.<
SysDept
>
query
().
lambda
().
eq
(
SysDept:
:
getDeptDn
,
dn
));
...
...
yifu-upms/yifu-upms-biz/src/main/resources/mapper/SysUserMapper.xml
View file @
444af7e0
...
...
@@ -210,17 +210,15 @@
<insert
id=
"batchInsertUser"
parameterType=
"java.util.List"
>
insert into sys_user
(user_id,username,phone,email,
password,nickname,deptId
,create_time)
(user_id,username,phone,email,
nickname
,create_time)
VALUES
<foreach
collection=
"list"
item=
"item"
index=
"index"
separator=
","
>
(
REPLACE(UUID(),"-",""),
#{item.uid,jdbcType=VARCHAR},
#{item.telephoneNumber,jdbcType=VARCHAR},
#{item.email,jdbcType=VARCHAR},
#{item.password,jdbcType=VARCHAR},
#{item.personName,jdbcType=VARCHAR},
#{item.deptId,jdbcType=VARCHAR},
#{item.uid},
#{item.telephoneNumber},
#{item.email},
#{item.personName},
now()
)
</foreach>
...
...
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