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
e329bf78
Commit
e329bf78
authored
Aug 26, 2022
by
huyuchen
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop' into develop
parents
df8f8048
f555341d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
9 deletions
+25
-9
IdCardUtil.java
.../yifu/cloud/plus/v1/yifu/common/core/util/IdCardUtil.java
+6
-6
TSalaryAccount.java
...yifu/cloud/plus/v1/yifu/salary/entity/TSalaryAccount.java
+4
-1
TSalaryAccountMapper.xml
...ry-biz/src/main/resources/mapper/TSalaryAccountMapper.xml
+12
-1
TStatisticsCurrentReportMapper.xml
.../main/resources/mapper/TStatisticsCurrentReportMapper.xml
+3
-1
No files found.
yifu-common/yifu-common-core/src/main/java/com/yifu/cloud/plus/v1/yifu/common/core/util/IdCardUtil.java
View file @
e329bf78
...
...
@@ -33,7 +33,6 @@ public class IdCardUtil {
/**
* 根据身份证号计算周岁
* 例如:当前时间是2022-08-22,那么2007-08-22算15周岁,2007-08-23才算16周岁
*
* @author licancan
* @param idNO
...
...
@@ -58,11 +57,12 @@ public class IdCardUtil {
int
yearBirth
=
bir
.
get
(
Calendar
.
YEAR
);
int
monthBirth
=
bir
.
get
(
Calendar
.
MONTH
);
int
dayBirth
=
bir
.
get
(
Calendar
.
DAY_OF_MONTH
);
// 大概年龄是当前年减去出生年
int
age
=
yearNow
-
yearBirth
;
// 如果出当前月大于出生月,或者当前月等于出生月但是当前日大于出生日,那么年龄age就加一岁
if
(
monthNow
>
monthBirth
||
(
monthNow
==
monthBirth
&&
dayNow
>
dayBirth
))
{
age
++;
int
age
;
// 如果当前月大于出生月,或者当前月等于出生月但是当前日大于出生日 直接减,否则再减1
if
((
monthBirth
<
monthNow
)
||
(
monthBirth
==
monthNow
&&
dayBirth
<
dayNow
))
{
age
=
yearNow
-
yearBirth
;
}
else
{
age
=
yearNow
-
yearBirth
-
1
;
}
return
age
;
}
...
...
yifu-salary/yifu-salary-api/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/entity/TSalaryAccount.java
View file @
e329bf78
...
...
@@ -23,8 +23,10 @@ import com.baomidou.mybatisplus.annotation.TableField;
import
com.baomidou.mybatisplus.annotation.TableId
;
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.mybatis.base.BaseEntity
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
org.hibernate.validator.constraints.Length
;
import
javax.validation.constraints.NotBlank
;
...
...
@@ -40,8 +42,9 @@ import java.util.List;
*/
@Data
@TableName
(
"t_salary_account"
)
@EqualsAndHashCode
(
callSuper
=
true
)
@Schema
(
description
=
"工资报账主表(工资条)"
)
public
class
TSalaryAccount
{
public
class
TSalaryAccount
extends
BaseEntity
{
/**
* 主键
...
...
yifu-salary/yifu-salary-biz/src/main/resources/mapper/TSalaryAccountMapper.xml
View file @
e329bf78
...
...
@@ -67,6 +67,11 @@
<result
property=
"salaryTaxUnit"
column=
"SALARY_TAX_UNIT"
/>
<result
property=
"haveSalaryFlag"
column=
"HAVE_SALARY_FLAG"
/>
<result
property=
"haveSpecialFlag"
column=
"HAVE_SPECIAL_FLAG"
/>
<result
property=
"createBy"
column=
"CREATE_BY"
/>
<result
property=
"createName"
column=
"CREATE_NAME"
/>
<result
property=
"createTime"
column=
"CREATE_TIME"
/>
<result
property=
"updateBy"
column=
"UPDATE_BY"
/>
<result
property=
"updateTime"
column=
"UPDATE_TIME"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
a.ID,
...
...
@@ -111,7 +116,12 @@
a.RELAY_SALARY_UNIT,
a.SALARY_TAX_UNIT,
a.HAVE_SALARY_FLAG,
a.HAVE_SPECIAL_FLAG
a.HAVE_SPECIAL_FLAG,
a.CREATE_BY,
a.CREATE_NAME,
a.CREATE_TIME,
a.UPDATE_BY,
a.UPDATE_TIME
</sql>
<sql
id=
"tSalaryAccount_where"
>
<if
test=
"tSalaryAccount != null"
>
...
...
@@ -249,6 +259,7 @@
a.DELETE_FLAG = 0
<include
refid=
"tSalaryAccount_where"
/>
</where>
order by a.CREATE_TIME desc
</select>
<!-- 获取校验的报账明细 ### 格式:身份证号_工资月份_报表类型_应发金额 -->
...
...
yifu-salary/yifu-salary-biz/src/main/resources/mapper/TStatisticsCurrentReportMapper.xml
View file @
e329bf78
...
...
@@ -201,6 +201,7 @@
1=1
<include
refid=
"tStatisticsCurrentReport_where"
/>
</where>
order by a.DECLARE_MONTH desc
</select>
<!-- 本期申报 -->
...
...
@@ -257,7 +258,8 @@
where m.declare_MONTH
<![CDATA[<=]]>
#{lastMonth} and m.declare_MONTH like '${nowYear}%'
GROUP BY m.EMP_IDCARD,m.INVOICE_TITLE
) m on m.EMP_IDCARD=s.EMP_IDCARD and m.INVOICE_TITLE = s.INVOICE_TITLE
where s.DECLARE_MONTH = #{nowMonth}
left join t_statistics_declarer d on d.EMP_IDCARD=s.EMP_IDCARD and d.DECLARE_MONTH=#{nowMonth}
where s.DECLARE_MONTH = #{nowMonth} and (d.id is null or d.IS_DECLARE = '0')
)
</insert>
...
...
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