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
19232c29
Commit
19232c29
authored
Jan 16, 2025
by
hongguangwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MVP1.7.5-薪资提交校验
parent
761d0a9f
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
77 additions
and
29 deletions
+77
-29
TInsuranceUnpurchasePersonSalaryMapper.java
...salary/mapper/TInsuranceUnpurchasePersonSalaryMapper.java
+8
-2
TInsuranceUnpurchasePersonSalaryService.java
...lary/service/TInsuranceUnpurchasePersonSalaryService.java
+18
-0
TInsuranceUnpurchasePersonSalaryServiceImpl.java
...ice/impl/TInsuranceUnpurchasePersonSalaryServiceImpl.java
+15
-2
TSalaryStandardServiceImpl.java
.../yifu/salary/service/impl/TSalaryStandardServiceImpl.java
+13
-20
TInsuranceUnpurchasePersonSalaryMapper.xml
...sources/mapper/TInsuranceUnpurchasePersonSalaryMapper.xml
+23
-5
No files found.
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/mapper/TInsuranceUnpurchasePersonSalaryMapper.java
View file @
19232c29
...
@@ -7,6 +7,8 @@ import com.yifu.cloud.plus.v1.yifu.salary.entity.TInsuranceUnpurchasePersonSalar
...
@@ -7,6 +7,8 @@ import com.yifu.cloud.plus.v1.yifu.salary.entity.TInsuranceUnpurchasePersonSalar
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
/**
/**
* 含风险项目不购买申请明细表-薪资关联表
* 含风险项目不购买申请明细表-薪资关联表
*
*
...
@@ -24,9 +26,13 @@ public interface TInsuranceUnpurchasePersonSalaryMapper extends BaseMapper<TInsu
...
@@ -24,9 +26,13 @@ public interface TInsuranceUnpurchasePersonSalaryMapper extends BaseMapper<TInsu
IPage
<
TInsuranceUnpurchasePersonSalary
>
getTInsuranceUnpurchasePersonSalaryPage
(
Page
<
TInsuranceUnpurchasePersonSalary
>
page
IPage
<
TInsuranceUnpurchasePersonSalary
>
getTInsuranceUnpurchasePersonSalaryPage
(
Page
<
TInsuranceUnpurchasePersonSalary
>
page
,
@Param
(
"tInsuranceUnpurchasePersonSalary"
)
TInsuranceUnpurchasePersonSalary
tInsuranceUnpurchasePersonSalary
);
,
@Param
(
"tInsuranceUnpurchasePersonSalary"
)
TInsuranceUnpurchasePersonSalary
tInsuranceUnpurchasePersonSalary
);
// 查找薪资对用的人员表
List
<
String
>
getParentIdBySalaryId
(
@Param
(
"salaryId"
)
String
salaryId
);
// 删除关联项
// 删除关联项
void
deletePersonSalaryBySalaryId
(
@Param
(
"salaryId"
)
String
salaryId
);
void
deletePersonSalaryBySalaryId
(
@Param
(
"salaryId"
)
String
salaryId
);
// 更新次数-1
void
updatePersonSalaryNumBySalaryId
(
@Param
(
"salaryId"
)
String
salaryId
);
// 刷新次数
void
updatePersonSalaryNumByPersonIdList
(
@Param
(
"idList"
)
List
<
String
>
idList
);
}
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/TInsuranceUnpurchasePersonSalaryService.java
View file @
19232c29
...
@@ -5,6 +5,8 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
...
@@ -5,6 +5,8 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TInsuranceUnpurchasePersonSalary
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TInsuranceUnpurchasePersonSalary
;
import
java.util.List
;
/**
/**
* 含风险项目不购买申请明细表-薪资关联
* 含风险项目不购买申请明细表-薪资关联
*
*
...
@@ -20,6 +22,22 @@ public interface TInsuranceUnpurchasePersonSalaryService extends IService<TInsur
...
@@ -20,6 +22,22 @@ public interface TInsuranceUnpurchasePersonSalaryService extends IService<TInsur
*/
*/
IPage
<
TInsuranceUnpurchasePersonSalary
>
getTInsuranceUnpurchasePersonSalaryPage
(
Page
<
TInsuranceUnpurchasePersonSalary
>
page
,
TInsuranceUnpurchasePersonSalary
tInsuranceUnpurchasePerson
);
IPage
<
TInsuranceUnpurchasePersonSalary
>
getTInsuranceUnpurchasePersonSalaryPage
(
Page
<
TInsuranceUnpurchasePersonSalary
>
page
,
TInsuranceUnpurchasePersonSalary
tInsuranceUnpurchasePerson
);
/**
* @param salaryId 工资id
* @Description: 删除并刷新次数
* @Author: hgw
* @Date: 2025/1/16 17:47
* @return: void
**/
void
deletePersonSalaryBySalaryId
(
String
salaryId
);
void
deletePersonSalaryBySalaryId
(
String
salaryId
);
/**
* @param parentIds 明细主表ids
* @Description: 刷新次数
* @Author: hgw
* @Date: 2025/1/16 17:47
* @return: void
**/
void
updatePersonSalaryNumByParentIds
(
List
<
String
>
parentIds
);
}
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/TInsuranceUnpurchasePersonSalaryServiceImpl.java
View file @
19232c29
...
@@ -9,6 +9,8 @@ import com.yifu.cloud.plus.v1.yifu.salary.service.TInsuranceUnpurchasePersonSala
...
@@ -9,6 +9,8 @@ import com.yifu.cloud.plus.v1.yifu.salary.service.TInsuranceUnpurchasePersonSala
import
lombok.extern.log4j.Log4j2
;
import
lombok.extern.log4j.Log4j2
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
/**
/**
* 含风险项目不购买申请明细表
* 含风险项目不购买申请明细表
*
*
...
@@ -39,8 +41,19 @@ public class TInsuranceUnpurchasePersonSalaryServiceImpl extends ServiceImpl<TIn
...
@@ -39,8 +41,19 @@ public class TInsuranceUnpurchasePersonSalaryServiceImpl extends ServiceImpl<TIn
**/
**/
@Override
@Override
public
void
deletePersonSalaryBySalaryId
(
String
salaryId
)
{
public
void
deletePersonSalaryBySalaryId
(
String
salaryId
)
{
baseMapper
.
updatePersonSalaryNumBySalaryId
(
salaryId
);
List
<
String
>
parentIds
=
baseMapper
.
getParentIdBySalaryId
(
salaryId
);
baseMapper
.
deletePersonSalaryBySalaryId
(
salaryId
);
// 后刷新次数
if
(
parentIds
!=
null
&&
!
parentIds
.
isEmpty
())
{
// 先删除
baseMapper
.
deletePersonSalaryBySalaryId
(
salaryId
);
baseMapper
.
updatePersonSalaryNumByPersonIdList
(
parentIds
);
}
}
@Override
public
void
updatePersonSalaryNumByParentIds
(
List
<
String
>
parentIds
)
{
// 刷新次数
baseMapper
.
updatePersonSalaryNumByPersonIdList
(
parentIds
);
}
}
}
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/TSalaryStandardServiceImpl.java
View file @
19232c29
...
@@ -1144,8 +1144,8 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
...
@@ -1144,8 +1144,8 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
boolean
isTrue
;
boolean
isTrue
;
List
<
SalaryRiskVo
>
returnList
=
new
ArrayList
<>();
List
<
SalaryRiskVo
>
returnList
=
new
ArrayList
<>();
List
<
TInsuranceUnpurchasePersonSalary
>
updat
ePerSonSalaryList
=
new
ArrayList
<>();
List
<
TInsuranceUnpurchasePersonSalary
>
sav
ePerSonSalaryList
=
new
ArrayList
<>();
List
<
TInsuranceUnpurchasePerson
>
updatePerSonList
=
new
ArrayList
<>();
List
<
String
>
updatePerSonList
=
new
ArrayList
<>();
for
(
SalaryRiskVo
a
:
noRisklist
)
{
for
(
SalaryRiskVo
a
:
noRisklist
)
{
isTrue
=
false
;
isTrue
=
false
;
buyPerson
=
buyMap
.
get
(
a
.
getEmpIdCard
());
buyPerson
=
buyMap
.
get
(
a
.
getEmpIdCard
());
...
@@ -1153,11 +1153,11 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
...
@@ -1153,11 +1153,11 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
if
(
buyPerson
.
getReasonType
()
!=
null
)
{
if
(
buyPerson
.
getReasonType
()
!=
null
)
{
if
(
CommonConstants
.
TWO_STRING
.
equals
(
buyPerson
.
getReasonType
()))
{
if
(
CommonConstants
.
TWO_STRING
.
equals
(
buyPerson
.
getReasonType
()))
{
isTrue
=
true
;
isTrue
=
true
;
setUpdateRiskInfo
(
s
,
buyPerson
,
updat
ePerSonSalaryList
,
updatePerSonList
);
setUpdateRiskInfo
(
s
,
buyPerson
,
sav
ePerSonSalaryList
,
updatePerSonList
);
}
else
if
(
CommonConstants
.
ONE_STRING
.
equals
(
buyPerson
.
getReasonType
()))
{
}
else
if
(
CommonConstants
.
ONE_STRING
.
equals
(
buyPerson
.
getReasonType
()))
{
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
buyPerson
.
getSocialStatus
()))
{
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
buyPerson
.
getSocialStatus
()))
{
isTrue
=
true
;
isTrue
=
true
;
setUpdateRiskInfo
(
s
,
buyPerson
,
updat
ePerSonSalaryList
,
updatePerSonList
);
setUpdateRiskInfo
(
s
,
buyPerson
,
sav
ePerSonSalaryList
,
updatePerSonList
);
}
else
{
}
else
{
a
.
setMsg
(
"“不购买申请”原因为“社保已购买”,但社保不在保"
);
a
.
setMsg
(
"“不购买申请”原因为“社保已购买”,但社保不在保"
);
}
}
...
@@ -1174,11 +1174,11 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
...
@@ -1174,11 +1174,11 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
}
}
// 无错误信息返回
// 无错误信息返回
if
(
returnList
.
isEmpty
())
{
if
(
returnList
.
isEmpty
())
{
if
(!
updatePerSon
List
.
isEmpty
())
{
if
(!
savePerSonSalary
List
.
isEmpty
())
{
tInsuranceUnpurchasePersonS
ervice
.
updateBatchById
(
updatePerSon
List
);
tInsuranceUnpurchasePersonS
alaryService
.
saveBatch
(
savePerSonSalary
List
);
}
if
(!
updatePerSonList
.
isEmpty
())
{
if
(!
updatePerSonSalaryList
.
isEmpty
())
{
tInsuranceUnpurchasePersonSalaryService
.
updatePersonSalaryNumByParentIds
(
updatePerSonList
);
tInsuranceUnpurchasePersonSalaryService
.
saveBatch
(
updatePerSonSalaryList
);
}
}
}
return
getTrueR
(
s
,
"校验【商险不购买】通过"
);
return
getTrueR
(
s
,
"校验【商险不购买】通过"
);
}
else
{
}
else
{
...
@@ -1219,23 +1219,16 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
...
@@ -1219,23 +1219,16 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
* @return: void
* @return: void
**/
**/
private
void
setUpdateRiskInfo
(
TSalaryStandard
s
,
TInsuranceUnpurchasePerson
buyPerson
private
void
setUpdateRiskInfo
(
TSalaryStandard
s
,
TInsuranceUnpurchasePerson
buyPerson
,
List
<
TInsuranceUnpurchasePersonSalary
>
updatePerSonSalaryList
,
List
<
TInsuranceUnpurchasePersonSalary
>
savePerSonSalaryList
,
List
<
TInsuranceUnpurchasePerson
>
updatePerSonList
)
{
,
List
<
String
>
updatePerSonList
)
{
TInsuranceUnpurchasePerson
updatePerSon
=
new
TInsuranceUnpurchasePerson
();
updatePerSonList
.
add
(
buyPerson
.
getId
());
updatePerSon
.
setId
(
buyPerson
.
getId
());
if
(
Common
.
isEmpty
(
buyPerson
.
getSalaryNum
()))
{
updatePerSon
.
setSalaryNum
(
CommonConstants
.
ONE_INT
);
}
else
{
updatePerSon
.
setSalaryNum
(
buyPerson
.
getSalaryNum
()
+
CommonConstants
.
ONE_INT
);
}
updatePerSonList
.
add
(
updatePerSon
);
TInsuranceUnpurchasePersonSalary
updatePerSonSalary
=
new
TInsuranceUnpurchasePersonSalary
();
TInsuranceUnpurchasePersonSalary
updatePerSonSalary
=
new
TInsuranceUnpurchasePersonSalary
();
updatePerSonSalary
.
setSalaryId
(
s
.
getId
());
updatePerSonSalary
.
setSalaryId
(
s
.
getId
());
updatePerSonSalary
.
setApplyNo
(
s
.
getApplyNo
());
updatePerSonSalary
.
setApplyNo
(
s
.
getApplyNo
());
updatePerSonSalary
.
setParentId
(
buyPerson
.
getId
());
updatePerSonSalary
.
setParentId
(
buyPerson
.
getId
());
updatePerSonSalary
.
setSalaryMonth
(
s
.
getSalaryMonth
());
updatePerSonSalary
.
setSalaryMonth
(
s
.
getSalaryMonth
());
updat
ePerSonSalaryList
.
add
(
updatePerSonSalary
);
sav
ePerSonSalaryList
.
add
(
updatePerSonSalary
);
}
}
}
}
yifu-salary/yifu-salary-biz/src/main/resources/mapper/TInsuranceUnpurchasePersonSalaryMapper.xml
View file @
19232c29
...
@@ -58,6 +58,15 @@
...
@@ -58,6 +58,15 @@
<include
refid=
"tInsuranceUnpurchasePerson_where"
/>
<include
refid=
"tInsuranceUnpurchasePerson_where"
/>
</select>
</select>
<!-- 获取parentId -->
<select
id=
"getParentIdBySalaryId"
resultType=
"java.lang.String"
>
SELECT
a.id
FROM t_insurance_unpurchase_person a
join t_insurance_unpurchase_person_salary s on s.PARENT_ID=a.ID
where s.SALARY_ID = #{salaryId}
</select>
<!--删除关联项-->
<!--删除关联项-->
<update
id=
"deletePersonSalaryBySalaryId"
>
<update
id=
"deletePersonSalaryBySalaryId"
>
update t_insurance_unpurchase_person_salary a
update t_insurance_unpurchase_person_salary a
...
@@ -65,12 +74,21 @@
...
@@ -65,12 +74,21 @@
where a.SALARY_ID = #{salaryId}
where a.SALARY_ID = #{salaryId}
</update>
</update>
<!--
更新次数-1
-->
<!--
更新次数
-->
<update
id=
"updatePersonSalaryNumBy
SalaryId
"
>
<update
id=
"updatePersonSalaryNumBy
PersonIdList
"
>
update t_insurance_unpurchase_person a
update t_insurance_unpurchase_person a
left join t_insurance_unpurchase_person_salary b on a.id=b.PARENT_ID
JOIN (
set a.SALARY_NUM = (if(a.SALARY_NUM is null or a.SALARY_NUM = 0,1,a.SALARY_NUM) - 1)
select sum(if(c.DELETE_FLAG = 0,1,0)) num,c.PARENT_ID from t_insurance_unpurchase_person_salary c where c.PARENT_ID in
where b.DELETE_FLAG = 0 and b.SALARY_ID = #{salaryId}
<foreach
item=
"idStr"
index=
"index"
collection=
"idList"
open=
"("
separator=
","
close=
")"
>
#{idStr}
</foreach>
GROUP BY c.PARENT_ID
) d on d.PARENT_ID=a.id
set a.SALARY_NUM = d.num
where a.id in
<foreach
item=
"idStr"
index=
"index"
collection=
"idList"
open=
"("
separator=
","
close=
")"
>
#{idStr}
</foreach>
</update>
</update>
</mapper>
</mapper>
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