Commit fbee436d by jianan

零时薪资单1

parent 3974d2b1
package com.yd.dal.entity.salary;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
* ag_acl_salary
* @author
*/
public class AgAclSalary implements Serializable {
/**
* serial id
*/
private Long id;
/**
* practitioner_id
*/
private Long practitionerId;
/**
* 从业人员编号
*/
private String practitionerCode;
/**
* 薪资年月
*/
private String yearMonth;
/**
* 薪资类别(1=个人销售A; 2=销售管理B; 3=其他加扣款C)
*/
private Integer salaryType;
/**
* 薪资code
*/
private String salaryCode;
/**
* 薪资名称
*/
private String salaryName;
/**
* 金额
*/
private BigDecimal amount;
/**
* 税额
*/
private BigDecimal tax;
/**
* 税后金额
*/
private BigDecimal afterTaxAmount;
/**
* FK ag_acl_life_practitioner_salary.id
*/
private Long lifePractitionerSalaryId;
/**
* 1=active 2=inactive
*/
private Integer isActive;
/**
* 备注
*/
private String remark;
/**
* 创建时间
*/
private Date createdAt;
/**
* FK ag_acl_user.id
*/
private Long createdBy;
/**
* 修改时间
*/
private Date updatedAt;
/**
* FK ag_acl_user.id
*/
private Long updatedBy;
private static final long serialVersionUID = 1L;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Long getPractitionerId() {
return practitionerId;
}
public void setPractitionerId(Long practitionerId) {
this.practitionerId = practitionerId;
}
public String getPractitionerCode() {
return practitionerCode;
}
public void setPractitionerCode(String practitionerCode) {
this.practitionerCode = practitionerCode;
}
public String getYearMonth() {
return yearMonth;
}
public void setYearMonth(String yearMonth) {
this.yearMonth = yearMonth;
}
public Integer getSalaryType() {
return salaryType;
}
public void setSalaryType(Integer salaryType) {
this.salaryType = salaryType;
}
public String getSalaryCode() {
return salaryCode;
}
public void setSalaryCode(String salaryCode) {
this.salaryCode = salaryCode;
}
public String getSalaryName() {
return salaryName;
}
public void setSalaryName(String salaryName) {
this.salaryName = salaryName;
}
public BigDecimal getAmount() {
return amount;
}
public void setAmount(BigDecimal amount) {
this.amount = amount;
}
public BigDecimal getTax() {
return tax;
}
public void setTax(BigDecimal tax) {
this.tax = tax;
}
public BigDecimal getAfterTaxAmount() {
return afterTaxAmount;
}
public void setAfterTaxAmount(BigDecimal afterTaxAmount) {
this.afterTaxAmount = afterTaxAmount;
}
public Long getLifePractitionerSalaryId() {
return lifePractitionerSalaryId;
}
public void setLifePractitionerSalaryId(Long lifePractitionerSalaryId) {
this.lifePractitionerSalaryId = lifePractitionerSalaryId;
}
public Integer getIsActive() {
return isActive;
}
public void setIsActive(Integer isActive) {
this.isActive = isActive;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
public Date getCreatedAt() {
return createdAt;
}
public void setCreatedAt(Date createdAt) {
this.createdAt = createdAt;
}
public Long getCreatedBy() {
return createdBy;
}
public void setCreatedBy(Long createdBy) {
this.createdBy = createdBy;
}
public Date getUpdatedAt() {
return updatedAt;
}
public void setUpdatedAt(Date updatedAt) {
this.updatedAt = updatedAt;
}
public Long getUpdatedBy() {
return updatedBy;
}
public void setUpdatedBy(Long updatedBy) {
this.updatedBy = updatedBy;
}
@Override
public boolean equals(Object that) {
if (this == that) {
return true;
}
if (that == null) {
return false;
}
if (getClass() != that.getClass()) {
return false;
}
AgAclSalary other = (AgAclSalary) that;
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
&& (this.getPractitionerId() == null ? other.getPractitionerId() == null : this.getPractitionerId().equals(other.getPractitionerId()))
&& (this.getPractitionerCode() == null ? other.getPractitionerCode() == null : this.getPractitionerCode().equals(other.getPractitionerCode()))
&& (this.getYearMonth() == null ? other.getYearMonth() == null : this.getYearMonth().equals(other.getYearMonth()))
&& (this.getSalaryType() == null ? other.getSalaryType() == null : this.getSalaryType().equals(other.getSalaryType()))
&& (this.getSalaryCode() == null ? other.getSalaryCode() == null : this.getSalaryCode().equals(other.getSalaryCode()))
&& (this.getSalaryName() == null ? other.getSalaryName() == null : this.getSalaryName().equals(other.getSalaryName()))
&& (this.getAmount() == null ? other.getAmount() == null : this.getAmount().equals(other.getAmount()))
&& (this.getTax() == null ? other.getTax() == null : this.getTax().equals(other.getTax()))
&& (this.getAfterTaxAmount() == null ? other.getAfterTaxAmount() == null : this.getAfterTaxAmount().equals(other.getAfterTaxAmount()))
&& (this.getLifePractitionerSalaryId() == null ? other.getLifePractitionerSalaryId() == null : this.getLifePractitionerSalaryId().equals(other.getLifePractitionerSalaryId()))
&& (this.getIsActive() == null ? other.getIsActive() == null : this.getIsActive().equals(other.getIsActive()))
&& (this.getRemark() == null ? other.getRemark() == null : this.getRemark().equals(other.getRemark()))
&& (this.getCreatedAt() == null ? other.getCreatedAt() == null : this.getCreatedAt().equals(other.getCreatedAt()))
&& (this.getCreatedBy() == null ? other.getCreatedBy() == null : this.getCreatedBy().equals(other.getCreatedBy()))
&& (this.getUpdatedAt() == null ? other.getUpdatedAt() == null : this.getUpdatedAt().equals(other.getUpdatedAt()))
&& (this.getUpdatedBy() == null ? other.getUpdatedBy() == null : this.getUpdatedBy().equals(other.getUpdatedBy()));
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
result = prime * result + ((getPractitionerId() == null) ? 0 : getPractitionerId().hashCode());
result = prime * result + ((getPractitionerCode() == null) ? 0 : getPractitionerCode().hashCode());
result = prime * result + ((getYearMonth() == null) ? 0 : getYearMonth().hashCode());
result = prime * result + ((getSalaryType() == null) ? 0 : getSalaryType().hashCode());
result = prime * result + ((getSalaryCode() == null) ? 0 : getSalaryCode().hashCode());
result = prime * result + ((getSalaryName() == null) ? 0 : getSalaryName().hashCode());
result = prime * result + ((getAmount() == null) ? 0 : getAmount().hashCode());
result = prime * result + ((getTax() == null) ? 0 : getTax().hashCode());
result = prime * result + ((getAfterTaxAmount() == null) ? 0 : getAfterTaxAmount().hashCode());
result = prime * result + ((getLifePractitionerSalaryId() == null) ? 0 : getLifePractitionerSalaryId().hashCode());
result = prime * result + ((getIsActive() == null) ? 0 : getIsActive().hashCode());
result = prime * result + ((getRemark() == null) ? 0 : getRemark().hashCode());
result = prime * result + ((getCreatedAt() == null) ? 0 : getCreatedAt().hashCode());
result = prime * result + ((getCreatedBy() == null) ? 0 : getCreatedBy().hashCode());
result = prime * result + ((getUpdatedAt() == null) ? 0 : getUpdatedAt().hashCode());
result = prime * result + ((getUpdatedBy() == null) ? 0 : getUpdatedBy().hashCode());
return result;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", practitionerId=").append(practitionerId);
sb.append(", practitionerCode=").append(practitionerCode);
sb.append(", yearMonth=").append(yearMonth);
sb.append(", salaryType=").append(salaryType);
sb.append(", salaryCode=").append(salaryCode);
sb.append(", salaryName=").append(salaryName);
sb.append(", amount=").append(amount);
sb.append(", tax=").append(tax);
sb.append(", afterTaxAmount=").append(afterTaxAmount);
sb.append(", lifePractitionerSalaryId=").append(lifePractitionerSalaryId);
sb.append(", isActive=").append(isActive);
sb.append(", remark=").append(remark);
sb.append(", createdAt=").append(createdAt);
sb.append(", createdBy=").append(createdBy);
sb.append(", updatedAt=").append(updatedAt);
sb.append(", updatedBy=").append(updatedBy);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();
}
}
\ No newline at end of file
package com.yd.dal.mapper.salary;
import com.yd.dal.entity.salary.AgAclSalary;
import java.util.List;
public interface AgAclSalaryMapper {
int deleteByPrimaryKey(Long id);
int insert(AgAclSalary record);
int insertSelective(AgAclSalary record);
AgAclSalary selectByPrimaryKey(Long id);
int updateByPrimaryKeySelective(AgAclSalary record);
int updateByPrimaryKey(AgAclSalary record);
List<AgAclSalary> queryListByPractitionerId(Long practitionerId);
}
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yd.dal.mapper.salary.AgAclSalaryMapper">
<resultMap id="BaseResultMap" type="com.yd.dal.entity.salary.AgAclSalary">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="practitioner_id" jdbcType="BIGINT" property="practitionerId" />
<result column="practitioner_code" jdbcType="VARCHAR" property="practitionerCode" />
<result column="year_month" jdbcType="VARCHAR" property="yearMonth" />
<result column="salary_type" jdbcType="INTEGER" property="salaryType" />
<result column="salary_code" jdbcType="VARCHAR" property="salaryCode" />
<result column="salary_name" jdbcType="VARCHAR" property="salaryName" />
<result column="amount" jdbcType="DECIMAL" property="amount" />
<result column="tax" jdbcType="DECIMAL" property="tax" />
<result column="after_tax_amount" jdbcType="DECIMAL" property="afterTaxAmount" />
<result column="life_practitioner_salary_id" jdbcType="BIGINT" property="lifePractitionerSalaryId" />
<result column="is_active" jdbcType="INTEGER" property="isActive" />
<result column="remark" jdbcType="VARCHAR" property="remark" />
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" />
<result column="created_by" jdbcType="BIGINT" property="createdBy" />
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" />
<result column="updated_by" jdbcType="BIGINT" property="updatedBy" />
</resultMap>
<sql id="Base_Column_List">
id, practitioner_id, practitioner_code, `year_month`, salary_type, salary_code, salary_name,
amount, tax, after_tax_amount, life_practitioner_salary_id, is_active, remark, created_at,
created_by, updated_at, updated_by
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from ag_acl_salary
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from ag_acl_salary
where id = #{id,jdbcType=BIGINT}
</delete>
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.yd.dal.entity.salary.AgAclSalary" useGeneratedKeys="true">
insert into ag_acl_salary (practitioner_id, practitioner_code,
`year_month`, salary_type, salary_code,
salary_name, amount, tax,
after_tax_amount, life_practitioner_salary_id,
is_active, remark, created_at,
created_by, updated_at, updated_by
)
values (#{practitionerId,jdbcType=BIGINT}, #{practitionerCode,jdbcType=VARCHAR},
#{yearMonth,jdbcType=VARCHAR}, #{salaryType,jdbcType=INTEGER}, #{salaryCode,jdbcType=VARCHAR},
#{salaryName,jdbcType=VARCHAR}, #{amount,jdbcType=DECIMAL}, #{tax,jdbcType=DECIMAL},
#{afterTaxAmount,jdbcType=DECIMAL}, #{lifePractitionerSalaryId,jdbcType=BIGINT},
#{isActive,jdbcType=INTEGER}, #{remark,jdbcType=VARCHAR}, #{createdAt,jdbcType=TIMESTAMP},
#{createdBy,jdbcType=BIGINT}, #{updatedAt,jdbcType=TIMESTAMP}, #{updatedBy,jdbcType=BIGINT}
)
</insert>
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.yd.dal.entity.salary.AgAclSalary" useGeneratedKeys="true">
insert into ag_acl_salary
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="practitionerId != null">
practitioner_id,
</if>
<if test="practitionerCode != null">
practitioner_code,
</if>
<if test="yearMonth != null">
`year_month`,
</if>
<if test="salaryType != null">
salary_type,
</if>
<if test="salaryCode != null">
salary_code,
</if>
<if test="salaryName != null">
salary_name,
</if>
<if test="amount != null">
amount,
</if>
<if test="tax != null">
tax,
</if>
<if test="afterTaxAmount != null">
after_tax_amount,
</if>
<if test="lifePractitionerSalaryId != null">
life_practitioner_salary_id,
</if>
<if test="isActive != null">
is_active,
</if>
<if test="remark != null">
remark,
</if>
<if test="createdAt != null">
created_at,
</if>
<if test="createdBy != null">
created_by,
</if>
<if test="updatedAt != null">
updated_at,
</if>
<if test="updatedBy != null">
updated_by,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="practitionerId != null">
#{practitionerId,jdbcType=BIGINT},
</if>
<if test="practitionerCode != null">
#{practitionerCode,jdbcType=VARCHAR},
</if>
<if test="yearMonth != null">
#{yearMonth,jdbcType=VARCHAR},
</if>
<if test="salaryType != null">
#{salaryType,jdbcType=INTEGER},
</if>
<if test="salaryCode != null">
#{salaryCode,jdbcType=VARCHAR},
</if>
<if test="salaryName != null">
#{salaryName,jdbcType=VARCHAR},
</if>
<if test="amount != null">
#{amount,jdbcType=DECIMAL},
</if>
<if test="tax != null">
#{tax,jdbcType=DECIMAL},
</if>
<if test="afterTaxAmount != null">
#{afterTaxAmount,jdbcType=DECIMAL},
</if>
<if test="lifePractitionerSalaryId != null">
#{lifePractitionerSalaryId,jdbcType=BIGINT},
</if>
<if test="isActive != null">
#{isActive,jdbcType=INTEGER},
</if>
<if test="remark != null">
#{remark,jdbcType=VARCHAR},
</if>
<if test="createdAt != null">
#{createdAt,jdbcType=TIMESTAMP},
</if>
<if test="createdBy != null">
#{createdBy,jdbcType=BIGINT},
</if>
<if test="updatedAt != null">
#{updatedAt,jdbcType=TIMESTAMP},
</if>
<if test="updatedBy != null">
#{updatedBy,jdbcType=BIGINT},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.yd.dal.entity.salary.AgAclSalary">
update ag_acl_salary
<set>
<if test="practitionerId != null">
practitioner_id = #{practitionerId,jdbcType=BIGINT},
</if>
<if test="practitionerCode != null">
practitioner_code = #{practitionerCode,jdbcType=VARCHAR},
</if>
<if test="yearMonth != null">
`year_month` = #{yearMonth,jdbcType=VARCHAR},
</if>
<if test="salaryType != null">
salary_type = #{salaryType,jdbcType=INTEGER},
</if>
<if test="salaryCode != null">
salary_code = #{salaryCode,jdbcType=VARCHAR},
</if>
<if test="salaryName != null">
salary_name = #{salaryName,jdbcType=VARCHAR},
</if>
<if test="amount != null">
amount = #{amount,jdbcType=DECIMAL},
</if>
<if test="tax != null">
tax = #{tax,jdbcType=DECIMAL},
</if>
<if test="afterTaxAmount != null">
after_tax_amount = #{afterTaxAmount,jdbcType=DECIMAL},
</if>
<if test="lifePractitionerSalaryId != null">
life_practitioner_salary_id = #{lifePractitionerSalaryId,jdbcType=BIGINT},
</if>
<if test="isActive != null">
is_active = #{isActive,jdbcType=INTEGER},
</if>
<if test="remark != null">
remark = #{remark,jdbcType=VARCHAR},
</if>
<if test="createdAt != null">
created_at = #{createdAt,jdbcType=TIMESTAMP},
</if>
<if test="createdBy != null">
created_by = #{createdBy,jdbcType=BIGINT},
</if>
<if test="updatedAt != null">
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
</if>
<if test="updatedBy != null">
updated_by = #{updatedBy,jdbcType=BIGINT},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.yd.dal.entity.salary.AgAclSalary">
update ag_acl_salary
set practitioner_id = #{practitionerId,jdbcType=BIGINT},
practitioner_code = #{practitionerCode,jdbcType=VARCHAR},
`year_month` = #{yearMonth,jdbcType=VARCHAR},
salary_type = #{salaryType,jdbcType=INTEGER},
salary_code = #{salaryCode,jdbcType=VARCHAR},
salary_name = #{salaryName,jdbcType=VARCHAR},
amount = #{amount,jdbcType=DECIMAL},
tax = #{tax,jdbcType=DECIMAL},
after_tax_amount = #{afterTaxAmount,jdbcType=DECIMAL},
life_practitioner_salary_id = #{lifePractitionerSalaryId,jdbcType=BIGINT},
is_active = #{isActive,jdbcType=INTEGER},
remark = #{remark,jdbcType=VARCHAR},
created_at = #{createdAt,jdbcType=TIMESTAMP},
created_by = #{createdBy,jdbcType=BIGINT},
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
updated_by = #{updatedBy,jdbcType=BIGINT}
where id = #{id,jdbcType=BIGINT}
</update>
<select id="queryListByPractitionerId" parameterType="java.lang.Long" resultMap="BaseResultMap">
select * from ag_acl_salary
where practitioner_id = #{practitionerId,jdbcType=BIGINT}
</select>
</mapper>
\ No newline at end of file
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