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
50ded665
Commit
50ded665
authored
Jun 25, 2023
by
fangxinjiang
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/MVP1.5.5' into MVP1.5.5
parents
325bc44b
2f0530d1
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
111 additions
and
1 deletion
+111
-1
TConfigSalary.java
.../yifu/cloud/plus/v1/yifu/salary/entity/TConfigSalary.java
+27
-0
TConfigSalaryController.java
...us/v1/yifu/salary/controller/TConfigSalaryController.java
+24
-0
TSalaryStandardMapper.java
...oud/plus/v1/yifu/salary/mapper/TSalaryStandardMapper.java
+11
-0
TSalaryStandardService.java
...d/plus/v1/yifu/salary/service/TSalaryStandardService.java
+11
-0
TSalaryStandardServiceImpl.java
.../yifu/salary/service/impl/TSalaryStandardServiceImpl.java
+14
-0
TConfigSalaryMapper.xml
...ary-biz/src/main/resources/mapper/TConfigSalaryMapper.xml
+6
-1
TSalaryStandardMapper.xml
...y-biz/src/main/resources/mapper/TSalaryStandardMapper.xml
+18
-0
No files found.
yifu-salary/yifu-salary-api/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/entity/TConfigSalary.java
View file @
50ded665
...
@@ -3,6 +3,7 @@ package com.yifu.cloud.plus.v1.yifu.salary.entity;
...
@@ -3,6 +3,7 @@ package com.yifu.cloud.plus.v1.yifu.salary.entity;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.alibaba.excel.annotation.write.style.HeadFontStyle
;
import
com.alibaba.excel.annotation.write.style.HeadFontStyle
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute
;
...
@@ -139,4 +140,30 @@ public class TConfigSalary extends BaseEntity implements Serializable {
...
@@ -139,4 +140,30 @@ public class TConfigSalary extends BaseEntity implements Serializable {
@ExcelProperty
(
value
=
"收入月份"
)
@ExcelProperty
(
value
=
"收入月份"
)
private
Integer
incomeMonth
;
private
Integer
incomeMonth
;
/**
* 月均发薪次数
*/
@NotNull
(
message
=
"月均发薪次数不能为空"
)
@ExcelAttribute
(
name
=
"月均发薪次数"
,
isNotEmpty
=
true
,
errorInfo
=
"月均发薪次数不能为空"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
value
=
"月均发薪次数"
)
private
Integer
salaryNum
;
/**
* @Description: 本结算月发薪次数:0:可以提交; 其他:不可提交
* @Author: hgw
* @Date: 2023/6/25 17:45
* @return:
**/
@TableField
(
exist
=
false
)
private
Integer
nowMonthSalaryNum
=
0
;
/**
* @Description: 本结算年未提交的发薪次数:0:可以提交; 其他:提交时二次确认
* @Author: hgw
* @Date: 2023/6/25 17:45
* @return:
**/
@TableField
(
exist
=
false
)
private
Integer
nowYearSalaryNum
=
0
;
}
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/controller/TConfigSalaryController.java
View file @
50ded665
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
salary
.
controller
;
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
salary
.
controller
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
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.Common
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.DateUtil
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
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.core.vo.YifuUser
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.util.MenuUtil
;
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.log.annotation.SysLog
;
import
com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils
;
import
com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TConfigSalary
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TConfigSalary
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryStandard
;
import
com.yifu.cloud.plus.v1.yifu.salary.mapper.TSalaryStandardMapper
;
import
com.yifu.cloud.plus.v1.yifu.salary.service.TConfigSalaryService
;
import
com.yifu.cloud.plus.v1.yifu.salary.service.TConfigSalaryService
;
import
com.yifu.cloud.plus.v1.yifu.salary.service.TSalaryStandardService
;
import
com.yifu.cloud.plus.v1.yifu.salary.util.SalaryConstants
;
import
com.yifu.cloud.plus.v1.yifu.salary.util.SalaryConstants
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TDispatchInfo
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.AllArgsConstructor
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
org.springframework.security.access.prepost.PreAuthorize
;
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.Date
;
import
java.util.List
;
import
java.util.List
;
...
@@ -38,6 +46,8 @@ import java.util.List;
...
@@ -38,6 +46,8 @@ import java.util.List;
public
class
TConfigSalaryController
{
public
class
TConfigSalaryController
{
private
final
TConfigSalaryService
tConfigSalaryService
;
private
final
TConfigSalaryService
tConfigSalaryService
;
private
final
TSalaryStandardService
tSalaryStandardService
;
private
final
TSalaryStandardMapper
tSalaryStandardMapper
;
private
final
MenuUtil
menuUtil
;
private
final
MenuUtil
menuUtil
;
/**
/**
* @param settleDepart 结算主体id
* @param settleDepart 结算主体id
...
@@ -56,6 +66,20 @@ public class TConfigSalaryController {
...
@@ -56,6 +66,20 @@ public class TConfigSalaryController {
QueryWrapper
<
TConfigSalary
>
queryWrapperCs
=
new
QueryWrapper
<>();
QueryWrapper
<
TConfigSalary
>
queryWrapperCs
=
new
QueryWrapper
<>();
queryWrapperCs
.
setEntity
(
configSalary
);
queryWrapperCs
.
setEntity
(
configSalary
);
List
<
TConfigSalary
>
configSalaryList
=
tConfigSalaryService
.
list
(
queryWrapperCs
);
List
<
TConfigSalary
>
configSalaryList
=
tConfigSalaryService
.
list
(
queryWrapperCs
);
if
(
configSalaryList
!=
null
&&
!
configSalaryList
.
isEmpty
())
{
String
nowMonth
=
DateUtil
.
addMonth
(
0
);
// 当前月 发薪次数
int
monthCount
=
tSalaryStandardService
.
getNum
(
settleDepart
,
nowMonth
,
null
);
String
nowYear
=
DateUtil
.
getYear
(
new
Date
());
// 当前年 未推送或未发放的 发薪次数
int
yearCount
=
tSalaryStandardService
.
getNum
(
settleDepart
,
null
,
nowYear
);
for
(
TConfigSalary
cs
:
configSalaryList
)
{
if
(
cs
.
getSalaryNum
()
<
monthCount
)
{
cs
.
setNowMonthSalaryNum
(
monthCount
);
}
cs
.
setNowYearSalaryNum
(
yearCount
);
}
}
return
new
R
<>(
configSalaryList
);
return
new
R
<>(
configSalaryList
);
}
}
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/mapper/TSalaryStandardMapper.java
View file @
50ded665
...
@@ -62,4 +62,15 @@ public interface TSalaryStandardMapper extends BaseMapper<TSalaryStandard> {
...
@@ -62,4 +62,15 @@ public interface TSalaryStandardMapper extends BaseMapper<TSalaryStandard> {
* @return: java.lang.String
* @return: java.lang.String
**/
**/
String
getMaxSalaryCode
();
String
getMaxSalaryCode
();
/**
* @param deptId 项目id
* @param settleMonth 结算月
* @param nowYear 当前结算年
* @Description: 获取薪资条数
* @Author: hgw
* @Date: 2023/6/25 18:04
* @return: int
**/
int
getNum
(
@Param
(
"deptId"
)
String
deptId
,
@Param
(
"settleMonth"
)
String
settleMonth
,
@Param
(
"nowYear"
)
String
nowYear
);
}
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/TSalaryStandardService.java
View file @
50ded665
...
@@ -133,4 +133,15 @@ public interface TSalaryStandardService extends IService<TSalaryStandard> {
...
@@ -133,4 +133,15 @@ public interface TSalaryStandardService extends IService<TSalaryStandard> {
**/
**/
R
<
String
>
doIncome
(
TSalaryStandard
tSalaryStandard
);
R
<
String
>
doIncome
(
TSalaryStandard
tSalaryStandard
);
/**
* @param deptId 项目id
* @param settleMonth 结算月
* @param nowYear 当前结算年
* @Description: 获取薪资条数
* @Author: hgw
* @Date: 2023/6/25 18:04
* @return: int
**/
int
getNum
(
String
deptId
,
String
settleMonth
,
String
nowYear
);
}
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/TSalaryStandardServiceImpl.java
View file @
50ded665
...
@@ -1065,4 +1065,18 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
...
@@ -1065,4 +1065,18 @@ public class TSalaryStandardServiceImpl extends ServiceImpl<TSalaryStandardMappe
newAccount
.
setAnnualBonusTax
(
null
);
newAccount
.
setAnnualBonusTax
(
null
);
}
}
/**
* @param deptId 项目id
* @param settleMonth 结算月
* @param nowYear 当前结算年
* @Description: 获取薪资条数
* @Author: hgw
* @Date: 2023/6/25 18:04
* @return: int
**/
@Override
public
int
getNum
(
String
deptId
,
String
settleMonth
,
String
nowYear
)
{
return
baseMapper
.
getNum
(
deptId
,
settleMonth
,
nowYear
);
}
}
}
yifu-salary/yifu-salary-biz/src/main/resources/mapper/TConfigSalaryMapper.xml
View file @
50ded665
...
@@ -16,6 +16,7 @@
...
@@ -16,6 +16,7 @@
<result
property=
"socialPriority"
column=
"SOCIAL_PRIORITY"
/>
<result
property=
"socialPriority"
column=
"SOCIAL_PRIORITY"
/>
<result
property=
"fundPriority"
column=
"FUND_PRIORITY"
/>
<result
property=
"fundPriority"
column=
"FUND_PRIORITY"
/>
<result
property=
"grantType"
column=
"GRANT_TYPE"
/>
<result
property=
"grantType"
column=
"GRANT_TYPE"
/>
<result
property=
"salaryNum"
column=
"SALARY_NUM"
/>
</resultMap>
</resultMap>
<!--tConfigSalary简单分页查询-->
<!--tConfigSalary简单分页查询-->
...
@@ -31,7 +32,8 @@
...
@@ -31,7 +32,8 @@
FUND_MONTH,
FUND_MONTH,
SOCIAL_PRIORITY,
SOCIAL_PRIORITY,
FUND_PRIORITY,
FUND_PRIORITY,
GRANT_TYPE
GRANT_TYPE,
SALARY_NUM
FROM t_config_salary a
FROM t_config_salary a
<where>
<where>
1=1
1=1
...
@@ -68,6 +70,9 @@
...
@@ -68,6 +70,9 @@
<if
test=
"tConfigSalary.grantType != null "
>
<if
test=
"tConfigSalary.grantType != null "
>
AND GRANT_TYPE = #{tConfigSalary.grantType}
AND GRANT_TYPE = #{tConfigSalary.grantType}
</if>
</if>
<if
test=
"tConfigSalary.salaryNum != null "
>
AND SALARY_NUM = #{tConfigSalary.salaryNum}
</if>
<!--数据权限判断-->
<!--数据权限判断-->
<if
test=
"depatIds != null and depatIds.size() > 0"
>
<if
test=
"depatIds != null and depatIds.size() > 0"
>
and DEPART_ID in
and DEPART_ID in
...
...
yifu-salary/yifu-salary-biz/src/main/resources/mapper/TSalaryStandardMapper.xml
View file @
50ded665
...
@@ -486,4 +486,22 @@
...
@@ -486,4 +486,22 @@
SELECT ifnull(max(right(e.APPLY_NO,4)),0) APPLY_NO FROM t_salary_standard e where e.DELETE_FLAG = 0 and e.CREATE_TIME>DATE_FORMAT(now(),'%Y-%m-%d')
SELECT ifnull(max(right(e.APPLY_NO,4)),0) APPLY_NO FROM t_salary_standard e where e.DELETE_FLAG = 0 and e.CREATE_TIME>DATE_FORMAT(now(),'%Y-%m-%d')
</select>
</select>
<!-- 获取薪资条数 -->
<select
id=
"getNum"
resultType=
"java.lang.Integer"
>
SELECT count(1)
FROM t_salary_standard a
where
a.DELETE_FLAG = 0
<if
test=
"deptId != null and deptId.trim() != ''"
>
and a.DEPT_ID = #{deptId}
</if>
<if
test=
"settleMonth != null and settleMonth.trim() != ''"
>
and a.SETTLEMENT_MONTH = #{settleMonth}
</if>
<if
test=
"nowYear != null and nowYear.trim() != ''"
>
and a.SETTLEMENT_MONTH like concat(#{nowYear},'%')
and a.STATUS not in (3,4)
</if>
</select>
</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