Commit 25c0e8c9 by 翁国栋 Committed by 284718418@qq.com

8小时后台--

解决了 Bug 导入名册页,未完成 1468
parent 502ce77f
...@@ -25,3 +25,12 @@ ALTER TABLE yggl_main_emp` ...@@ -25,3 +25,12 @@ ALTER TABLE yggl_main_emp`
ALTER TABLE `timer_test`.`insure_user` ALTER TABLE `timer_test`.`insure_user`
ADD COLUMN `create_time` datetime(0) NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '创建时间' AFTER `reason`; ADD COLUMN `create_time` datetime(0) NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '创建时间' AFTER `reason`;
CREATE TABLE ` yggl_main_importLog ` (
` id ` int(11) NOT NULL AUTO_INCREMENT,
` user_id ` int(11) NULL DEFAULT NULL COMMENT ''yggl_main_emp_empnum'',
` create_time ` datetime(0) NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP(0) COMMENT ''导入时间'',
` success_num ` int(11) NULL DEFAULT NULL COMMENT ''成功条数'',
` err_num ` int(11) NULL DEFAULT NULL COMMENT ''失败条数'',
` org_code ` int(11) NULL DEFAULT NULL,
PRIMARY KEY (` id `) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
package cn.timer.api.bean.yggl;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;
/**
*
*
* @author wgd
* @email 862422848@qq.com
* @date 2022-06-10 17:42:53
*/
@Entity
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Table(name="yggl_main_import_log")
@ApiModel("员工导入记录")
public class YgglMainImportLog extends Model<YgglMainImportLog> {
private static final long serialVersionUID = -1825678752247238544L;
@Id
@GeneratedValue
@TableId(type = IdType.AUTO)
@ApiModelProperty(value = "编号")
private Integer id;
/**
* yggl_main_emp_empnum
*/
private Integer userId;
/**
* 导入时间
*/
private Date createTime;
/**
* 成功条数
*/
private Integer successNum;
/**
* 失败条数
*/
private Integer errNum;
/**
*
*/
private Integer orgCode;
/**
* 设置:
*/
public void setId(Integer id) {
this.id = id;
}
/**
* 获取:
*/
public Integer getId() {
return id;
}
/**
* 设置:yggl_main_emp_id
*/
public void setUserId(Integer userId) {
this.userId = userId;
}
/**
* 获取:yggl_main_emp_id
*/
public Integer getUserId() {
return userId;
}
/**
* 设置:导入时间
*/
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
/**
* 获取:导入时间
*/
public Date getCreateTime() {
return createTime;
}
/**
* 设置:成功条数
*/
public void setSuccessNum(Integer successNum) {
this.successNum = successNum;
}
/**
* 获取:成功条数
*/
public Integer getSuccessNum() {
return successNum;
}
/**
* 设置:失败条数
*/
public void setErrNum(Integer errNum) {
this.errNum = errNum;
}
/**
* 获取:失败条数
*/
public Integer getErrNum() {
return errNum;
}
/**
* 设置:
*/
public void setOrgCode(Integer orgCode) {
this.orgCode = orgCode;
}
/**
* 获取:
*/
public Integer getOrgCode() {
return orgCode;
}
}
package cn.timer.api.dao.yggl;
import cn.timer.api.bean.yggl.YgglMainImportLog;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.springframework.stereotype.Repository;
/**
*
*
* @author wgd
* @email 862422848@qq.com
* @date 2022-06-10 17:42:53
*/
@Repository
public interface YgglMainImportlogMapper extends BaseMapper<YgglMainImportLog> {
}
...@@ -85,5 +85,11 @@ public class AddygdaDto extends Page implements Serializable{ ...@@ -85,5 +85,11 @@ public class AddygdaDto extends Page implements Serializable{
@ApiModelProperty(value="对应工作地点典ID",example="0") @ApiModelProperty(value="对应工作地点典ID",example="0")
private Integer zpglGzddId; private Integer zpglGzddId;
@ApiModelProperty(value = "员工状态 0试用、1正式、2离职中、3已离职",example = "0")
private Integer jobStatus;
@JSONField(format="yyyy-MM-dd")
@ApiModelProperty(value="离职日期 ",example="客户注册后的时间为入职时间")
private Date lzTime;
} }
<?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="cn.timer.api.dao.yggl.YgglMainImportlogMapper">
<!-- 可根据自己的需求,是否要使用 -->
<resultMap type="cn.timer.api.bean.yggl.YgglMainImportLog" id="ygglMainImportlogMap">
<result property="id" column="id"/>
<result property="userId" column="user_id"/>
<result property="createTime" column="create_time"/>
<result property="successNum" column="success_num"/>
<result property="errNum" column="err_num"/>
<result property="orgCode" column="org_code"/>
</resultMap>
<select id="queryObject" resultType="cn.timer.api.bean.yggl.YgglMainImportLog">
select *
from yggl_main_importLog
where id = #{value}
</select>
<select id="queryList" resultType="cn.timer.api.bean.yggl.YgglMainImportLog">
select * from yggl_main_importLog
<where>
<if test="id != null and id != ''">AND `id` = #{id}</if>
<if test="userId != null and userId != ''">AND `user_id` = #{userId}</if>
<if test="createTime != null and createTime != ''">AND `create_time` = #{createTime}</if>
<if test="successNum != null and successNum != ''">AND `success_num` = #{successNum}</if>
<if test="errNum != null and errNum != ''">AND `err_num` = #{errNum}</if>
<if test="orgCode != null and orgCode != ''">AND `org_code` = #{orgCode}</if>
</where>
<choose>
<when test="sidx != null and sidx.trim() != ''">
order by ${sidx} ${order}
</when>
<otherwise>
order by id desc
</otherwise>
</choose>
<if test="offset != null and limit != null">
limit #{offset}, #{limit}
</if>
</select>
<select id="queryTotal" resultType="int">
select count(*) from yggl_main_importLog
<where>
<if test="id != null and id != ''">AND `id` = #{id}</if>
<if test="userId != null and userId != ''">AND `user_id` = #{userId}</if>
<if test="createTime != null and createTime != ''">AND `create_time` = #{createTime}</if>
<if test="successNum != null and successNum != ''">AND `success_num` = #{successNum}</if>
<if test="errNum != null and errNum != ''">AND `err_num` = #{errNum}</if>
<if test="orgCode != null and orgCode != ''">AND `org_code` = #{orgCode}</if>
</where>
</select>
<insert id="save" parameterType="cn.timer.api.bean.yggl.YgglMainImportLog">
insert into yggl_main_importLog
(`id`,
`user_id`,
`create_time`,
`success_num`,
`err_num`,
`org_code`)
values (#{id},
#{userId},
#{createTime},
#{successNum},
#{errNum},
#{orgCode})
</insert>
<insert id="saveSelective" parameterType="cn.timer.api.bean.yggl.YgglMainImportLog">
insert into yggl_main_importLog
(
<if test="id != null">`id`</if>
<if test="userId != null">,`user_id`</if>
<if test="createTime != null">,`create_time`</if>
<if test="successNum != null">,`success_num`</if>
<if test="errNum != null">,`err_num`</if>
<if test="orgCode != null">,`org_code`</if>
)
values
(
<if test="id != null">#{id}</if>
<if test="userId != null">,#{userId}</if>
<if test="createTime != null">,#{createTime}</if>
<if test="successNum != null">,#{successNum}</if>
<if test="errNum != null">,#{errNum}</if>
<if test="orgCode != null">,#{orgCode}</if>
)
</insert>
<insert id="saveList" parameterType="cn.timer.api.bean.yggl.YgglMainImportLog">
insert into yggl_main_importLog
(
`id`,
`user_id`,
`create_time`,
`success_num`,
`err_num`,
`org_code`
)
values
<foreach collection="list" item="item" index="index" separator=",">
(
#{item.id},
#{item.userId},
#{item.createTime},
#{item.successNum},
#{item.errNum},
#{item.orgCode}
)
</foreach>
</insert>
<update id="update" parameterType="cn.timer.api.bean.yggl.YgglMainImportLog">
update yggl_main_importLog
<set>
<if test="userId != null">`user_id` = #{userId},</if>
<if test="createTime != null">`create_time` = #{createTime},</if>
<if test="successNum != null">`success_num` = #{successNum},</if>
<if test="errNum != null">`err_num` = #{errNum},</if>
<if test="orgCode != null">`org_code` = #{orgCode}</if>
</set>
where id = #{id}
</update>
<delete id="delete">
delete
from yggl_main_importLog
where id = #{value}
</delete>
<delete id="deleteBatch">
delete from yggl_main_importLog where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>
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