Commit 34077fc0 authored by hongguangwu's avatar hongguangwu

优化导入,精简字段

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