Commit e329bf78 authored by huyuchen's avatar huyuchen

Merge remote-tracking branch 'origin/develop' into develop

parents df8f8048 f555341d
......@@ -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;
}
......
......@@ -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 {
/**
* 主键
......
......@@ -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>
<!-- 获取校验的报账明细 ### 格式:身份证号_工资月份_报表类型_应发金额 -->
......
......@@ -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>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment