Commit 34077fc0 authored by hongguangwu's avatar hongguangwu

优化导入,精简字段

parent 14cd972c
......@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
......@@ -144,6 +145,7 @@ public class TDepartSettlementInfo extends Model<TDepartSettlementInfo> {
*/
@ExcelAttribute(name = "创建时间")
@Schema(description = "创建时间", name = "createTime")
@JsonFormat(shape= JsonFormat.Shape.STRING,pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
private LocalDateTime createTime;
/**
* 最后更新人
......@@ -157,6 +159,7 @@ public class TDepartSettlementInfo extends Model<TDepartSettlementInfo> {
*/
@ExcelAttribute(name = "最后更新时间")
@Schema(description = "最后更新时间", name = "lastUpdateTime")
@JsonFormat(shape= JsonFormat.Shape.STRING,pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
private LocalDateTime lastUpdateTime;
/**
* 结算主体ID
......
......@@ -4,8 +4,8 @@ import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
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.tags.Tag;
import lombok.Data;
import lombok.EqualsAndHashCode;
......@@ -13,7 +13,6 @@ import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank;
import java.math.BigDecimal;
import java.time.LocalDateTime;
/**
......@@ -27,7 +26,7 @@ import java.time.LocalDateTime;
@EqualsAndHashCode(callSuper = true)
@TableName("t_special_deducation_sum")
@Tag(name = "专项扣除")
public class TSpecialDeducationSum extends Model<TSpecialDeducationSum> {
public class TSpecialDeducationSum extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
* id
......@@ -35,21 +34,6 @@ public class TSpecialDeducationSum extends Model<TSpecialDeducationSum> {
@TableId(type = IdType.ASSIGN_ID)
@ExcelProperty(value = "id")
private String id;
/**
* 创建人
*/
@NotBlank(message = "创建人不能为空")
@Length(max = 32, message = "创建人不能超过32个字符")
@ExcelAttribute(name = "创建人", isNotEmpty = true, errorInfo = "创建人不能为空", maxLength = 32)
@ExcelProperty(value = "创建人")
private String createUser;
/**
* 创建时间
*/
@NotBlank(message = "创建时间不能为空")
@ExcelAttribute(name = "创建时间", isNotEmpty = true, errorInfo = "创建时间不能为空")
@ExcelProperty(value = "创建时间")
private LocalDateTime createTime;
/**
* 导入月份
*/
......
......@@ -777,8 +777,8 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
salary.setHaveSalaryFlag(CommonConstants.ZERO_INT);
salary.setHaveSpecialFlag(CommonConstants.ZERO_INT);
salary.setIsRepeat(CommonConstants.ZERO_INT);
salary.setStatus(SalaryConstants.AUDIT_STATUS[0]);
if (haveSalaryFlag || haveSpecialFlag || ownNum>0 || repeatFlag) {
salary.setStatus(SalaryConstants.AUDIT_STATUS[0]);
if (haveSalaryFlag) {
salary.setHaveSalaryFlag(CommonConstants.ONE_INT);
}
......@@ -788,8 +788,6 @@ public class SalaryUploadServiceImpl extends ServiceImpl<TSalaryStandardMapper,
if (repeatFlag) {
salary.setIsRepeat(CommonConstants.ONE_INT);
}
} else {
salary.setStatus(SalaryConstants.AUDIT_STATUS[2]);
}
//保存工资表
tSalaryStandardService.save(salary);
......
......@@ -142,7 +142,7 @@ public class TSpecialDeducationSumServiceImpl extends ServiceImpl<TSpecialDeduca
for (TSpecialDeducationSum s : sdsList) {
s.setCreateMonth(yearMonth);
s.setCreateTime(nowDate);
s.setCreateUser(String.valueOf(user.getId()));
s.setCreateBy(user.getId());
}
return new R<>(this.saveBatch(sdsList));
}
......
......@@ -6,7 +6,7 @@
<resultMap id="tSpecialDeducationSumMap" type="com.yifu.cloud.plus.v1.yifu.salary.entity.TSpecialDeducationSum">
<id property="id" column="id"/>
<result property="createUser" column="CREATE_USER"/>
<result property="createBy" column="CREATE_BY"/>
<result property="createTime" column="CREATE_TIME"/>
<result property="createMonth" column="CREATE_MONTH"/>
<result property="declareTitle" column="DECLARE_TITLE"/>
......@@ -42,7 +42,7 @@
<sql id="Base_Column_List">
id,
CREATE_USER,
CREATE_BY,
CREATE_TIME,
CREATE_MONTH,
DECLARE_TITLE,
......@@ -81,8 +81,8 @@
<if test="tSpecialDeducationSum.id != null and tSpecialDeducationSum.id.trim() != ''">
AND id = #{tSpecialDeducationSum.id}
</if>
<if test="tSpecialDeducationSum.createUser != null and tSpecialDeducationSum.createUser.trim() != ''">
AND CREATE_USER = #{tSpecialDeducationSum.createUser}
<if test="tSpecialDeducationSum.createBy != null and tSpecialDeducationSum.createBy.trim() != ''">
AND CREATE_BY = #{tSpecialDeducationSum.createBy}
</if>
<if test="tSpecialDeducationSum.createTime != null">
AND CREATE_TIME = #{tSpecialDeducationSum.createTime}
......
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