yaowanxin
21 小时以前 4c001e8b7efc1383d1cdfc8219538eeaec49c51b
人员管理,库存表
已修改2个文件
已添加18个文件
1277 ■■■■■ 文件已修改
src/main/java/com/ruoyi/inventory/domain/StockIn.java 70 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/inventory/domain/StockManagement.java 54 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/inventory/domain/StockOut.java 70 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/inventory/domain/StockProduct.java 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/inventory/mapper/StockInMapper.java 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/inventory/mapper/StockManagementMapper.java 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/inventory/mapper/StockOutMapper.java 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/inventory/mapper/StockProductMapper.java 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/staff_management/controller/RyglAddEmployeeController.java 94 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/staff_management/domain/RyglAddEmployee.java 104 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/staff_management/mapper/RyglAddEmployeeMapper.java 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/staff_management/service/RyglAddEmployeeService.java 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/staff_management/service/impl/RyglAddEmployeeServiceImpl.java 61 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/application-druid.yml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/application.yml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/StockInMapper.xml 130 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/StockManagementMapper.xml 106 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/StockOutMapper.xml 130 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/StockProductMapper.xml 75 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/staff_management/RyglAddEmployeeMapper.xml 194 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/inventory/domain/StockIn.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,70 @@
package inventory.domain;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import lombok.Data;
/**
 *
 * @TableName stock_in
 */
@Data
public class StockIn implements Serializable {
    /**
     * å…¥åº“记录ID
     */
    private Integer id;
    /**
     * äº§å“id
     */
    private Integer productId;
    /**
     * å…¥åº“æ—¶é—´
     */
    private Date inboundTime;
    /**
     * å…¥åº“批次(如“第三批次”)
     */
    private String inboundBatch;
    /**
     * ä¾›åº”商名称
     */
    private String supplierName;
    /**
     * å…¥åº“数量
     */
    private Integer inboundQuantity;
    /**
     * å«ç¨Žå•ä»·
     */
    private BigDecimal taxInclusivePrice;
    /**
     * å«ç¨Žæ€»ä»·
     */
    private BigDecimal taxInclusiveTotal;
    /**
     * ç¨Žçއ
     */
    private BigDecimal taxRate;
    /**
     * ä¸å«ç¨Žæ€»ä»·
     */
    private BigDecimal taxExclusiveTotal;
    /**
     * å…¥åº“人
     */
    private String inboundPerson;
    private static final long serialVersionUID = 1L;
}
src/main/java/com/ruoyi/inventory/domain/StockManagement.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,54 @@
package inventory.domain;
import java.io.Serializable;
import java.math.BigDecimal;
import lombok.Data;
/**
 *
 * @TableName stock_management
 */
@Data
public class StockManagement implements Serializable {
    /**
     * åº“存记录ID
     */
    private Integer id;
    /**
     * äº§å“id
     */
    private Integer productId;
    /**
     * å½“前库存量
     */
    private Integer stockQuantity;
    /**
     * å«ç¨Žå•ä»·
     */
    private BigDecimal taxInclusivePrice;
    /**
     * å«ç¨Žæ€»ä»·
     */
    private BigDecimal taxInclusiveTotal;
    /**
     * ç¨Žçއ
     */
    private BigDecimal taxRate;
    /**
     * ä¸å«ç¨Žæ€»ä»·
     */
    private BigDecimal taxExclusiveTotal;
    /**
     * å…¥åº“人
     */
    private String inboundPerson;
    private static final long serialVersionUID = 1L;
}
src/main/java/com/ruoyi/inventory/domain/StockOut.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,70 @@
package inventory.domain;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import lombok.Data;
/**
 *
 * @TableName stock_out
 */
@Data
public class StockOut implements Serializable {
    /**
     * å‡ºåº“记录ID
     */
    private Integer id;
    /**
     * äº§å“id
     */
    private Integer productId;
    /**
     * å‡ºåº“æ—¶é—´
     */
    private Date inboundTime;
    /**
     * å‡ºåº“批次(如“第三批次”)
     */
    private String inboundBatch;
    /**
     * ä¾›åº”商名称
     */
    private String supplierName;
    /**
     * å…¥åº“数量
     */
    private Integer inboundQuantity;
    /**
     * å«ç¨Žå•ä»·
     */
    private BigDecimal taxInclusivePrice;
    /**
     * å«ç¨Žæ€»ä»·
     */
    private BigDecimal taxInclusiveTotal;
    /**
     * ç¨Žçއ
     */
    private BigDecimal taxRate;
    /**
     * ä¸å«ç¨Žæ€»ä»·
     */
    private BigDecimal taxExclusiveTotal;
    /**
     * å‡ºåº“人
     */
    private String inboundPerson;
    private static final long serialVersionUID = 1L;
}
src/main/java/com/ruoyi/inventory/domain/StockProduct.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,33 @@
package inventory.domain;
import java.io.Serializable;
import lombok.Data;
/**
 *
 * @TableName stock_product
 */
@Data
public class StockProduct implements Serializable {
    /**
     * äº§å“ID
     */
    private Integer id;
    /**
     * äº§å“å¤§ç±»ï¼ˆå¦‚“产品1”)
     */
    private String productCategory;
    /**
     * è§„格型号
     */
    private String specModel;
    /**
     * å•位(如“吨”)
     */
    private String unit;
    private static final long serialVersionUID = 1L;
}
src/main/java/com/ruoyi/inventory/mapper/StockInMapper.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,25 @@
package inventory.mapper;
import inventory.domain.StockIn;
/**
* @author 86151
* @description é’ˆå¯¹è¡¨ã€stock_in】的数据库操作Mapper
* @createDate 2025-06-23 18:11:59
* @Entity inventory.domain.StockIn
*/
public interface StockInMapper {
    int deleteByPrimaryKey(Long id);
    int insert(StockIn record);
    int insertSelective(StockIn record);
    StockIn selectByPrimaryKey(Long id);
    int updateByPrimaryKeySelective(StockIn record);
    int updateByPrimaryKey(StockIn record);
}
src/main/java/com/ruoyi/inventory/mapper/StockManagementMapper.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,25 @@
package inventory.mapper;
import inventory.domain.StockManagement;
/**
* @author 86151
* @description é’ˆå¯¹è¡¨ã€stock_management】的数据库操作Mapper
* @createDate 2025-06-23 18:11:59
* @Entity inventory.domain.StockManagement
*/
public interface StockManagementMapper {
    int deleteByPrimaryKey(Long id);
    int insert(StockManagement record);
    int insertSelective(StockManagement record);
    StockManagement selectByPrimaryKey(Long id);
    int updateByPrimaryKeySelective(StockManagement record);
    int updateByPrimaryKey(StockManagement record);
}
src/main/java/com/ruoyi/inventory/mapper/StockOutMapper.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,25 @@
package inventory.mapper;
import inventory.domain.StockOut;
/**
* @author 86151
* @description é’ˆå¯¹è¡¨ã€stock_out】的数据库操作Mapper
* @createDate 2025-06-23 18:11:59
* @Entity inventory.domain.StockOut
*/
public interface StockOutMapper {
    int deleteByPrimaryKey(Long id);
    int insert(StockOut record);
    int insertSelective(StockOut record);
    StockOut selectByPrimaryKey(Long id);
    int updateByPrimaryKeySelective(StockOut record);
    int updateByPrimaryKey(StockOut record);
}
src/main/java/com/ruoyi/inventory/mapper/StockProductMapper.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,25 @@
package inventory.mapper;
import inventory.domain.StockProduct;
/**
* @author 86151
* @description é’ˆå¯¹è¡¨ã€stock_product】的数据库操作Mapper
* @createDate 2025-06-23 18:11:59
* @Entity inventory.domain.StockProduct
*/
public interface StockProductMapper {
    int deleteByPrimaryKey(Long id);
    int insert(StockProduct record);
    int insertSelective(StockProduct record);
    StockProduct selectByPrimaryKey(Long id);
    int updateByPrimaryKeySelective(StockProduct record);
    int updateByPrimaryKey(StockProduct record);
}
src/main/java/com/ruoyi/staff_management/controller/RyglAddEmployeeController.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,94 @@
package com.ruoyi.staff_management.controller;
import com.ruoyi.framework.web.controller.BaseController;
import com.ruoyi.framework.web.domain.AjaxResult;
import com.ruoyi.staff_management.domain.RyglAddEmployee;
import com.ruoyi.staff_management.service.RyglAddEmployeeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
@RestController
@RequestMapping("/staff_management")
public class RyglAddEmployeeController extends BaseController {
    @Autowired
    private RyglAddEmployeeService ryglAddEmployeeService;
    /**
     * èŽ·å–äººå‘˜åˆ—è¡¨
     */
//    @PreAuthorize("@ss.hasPermi('system:dept:list')")
    @GetMapping("/list")
    public AjaxResult list()
    {
        List<RyglAddEmployee> allEmployees = ryglAddEmployeeService.getAllEmployees();
        return success(allEmployees);
    }
    /**
     * æ ¹æ® ID èŽ·å–å‘˜å·¥ä¿¡æ¯
     * @param id å‘˜å·¥ ID
     * @return å‘˜å·¥ä¿¡æ¯
     */
    @GetMapping("/{id}")
    public AjaxResult getInfo(@PathVariable Long id) {
        RyglAddEmployee employee = ryglAddEmployeeService.getById(id);
        return success(employee);
    }
    /**
     * æ ¹æ®å§“名查询员工信息
     * @param name å‘˜å·¥å§“名
     * @return å‘˜å·¥ä¿¡æ¯åˆ—表
     */
    @GetMapping("/search")
    public AjaxResult searchByName(@RequestParam String name) {
        List<RyglAddEmployee> employees = ryglAddEmployeeService.searchByName(name);
        return success(employees);
    }
    /**
     * æ·»åŠ å‘˜å·¥ä¿¡æ¯
     * @param employee å‘˜å·¥ä¿¡æ¯
     * @return æ“ä½œç»“æžœ
     */
    @PostMapping
    public AjaxResult add(@RequestBody RyglAddEmployee employee) {
        boolean result = ryglAddEmployeeService.save(employee);
        return result ? success() : error();
    }
    /**
     * ä¿®æ”¹å‘˜å·¥ä¿¡æ¯
     * @param employee å‘˜å·¥ä¿¡æ¯
     * @return æ“ä½œç»“æžœ
     */
    @PutMapping
    public AjaxResult update(@RequestBody RyglAddEmployee employee) {
        boolean result = ryglAddEmployeeService.updateById(employee);
        return result ? success() : error();
    }
    /**
     * åˆ é™¤å‘˜å·¥ä¿¡æ¯
     * @param id å‘˜å·¥ ID
     * @return æ“ä½œç»“æžœ
     */
    @DeleteMapping("/{id}")
    public AjaxResult delete(@PathVariable Long id) {
        boolean result = ryglAddEmployeeService.removeById(id);
        return result ? success() : error();
    }
    /**
     * å¯¼å‡ºå‘˜å·¥ä¿¡æ¯
     * @return æ“ä½œç»“æžœ (Excel æ–‡ä»¶)
     */
//    @GetMapping("/export")
//    public AjaxResult export() {
//        // è°ƒç”¨å¯¼å‡ºæ–¹æ³•
//        ryglAddEmployeeService.export();
//        return success();
//    }
}
src/main/java/com/ruoyi/staff_management/domain/RyglAddEmployee.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,104 @@
package com.ruoyi.staff_management.domain;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
 *
 * @TableName rygl_add_employee
 */
@Data
public class RyglAddEmployee implements Serializable {
    /**
     * åºå·
     */
    private Integer id;
    /**
     * 1入职2离职
     */
    private Integer status;
    /**
     * å‘˜å·¥ç¼–号
     */
    private String employeeNumber;
    /**
     * å§“名
     */
    private String name;
    /**
     * æ€§åˆ«
     */
    private String sex;
    /**
     * ç±è´¯
     */
    private String nativePlace;
    /**
     * å²—位
     */
    private String post;
    /**
     * å®¶åº­ä½å€
     */
    private String homeAddress;
    /**
     * ç¬¬ä¸€å­¦åކ
     */
    private String firstDegree;
    /**
     * ä¸“业
     */
    private String major;
    /**
     * èº«ä»½è¯å·
     */
    private Integer idNumber;
    /**
     * å¹´é¾„
     */
    private Integer age;
    /**
     * è”系电话
     */
    private Integer contactNumber;
    /**
     * ç´§æ€¥è”系人
     */
    private String emergencyContact;
    /**
     * ç´§æ€¥è”系电话
     */
    private Integer emergencyContactNumber;
    /**
     * åˆåŒå¹´é™
     */
    private String contractTerm;
    /**
     * åˆåŒå¼€å§‹æ—¥æœŸ
     */
    private Date contractStartDate;
    /**
     * åˆåŒç»“束日期
     */
    private Date contractEndDate;
    private static final long serialVersionUID = 1L;
}
src/main/java/com/ruoyi/staff_management/mapper/RyglAddEmployeeMapper.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,30 @@
package com.ruoyi.staff_management.mapper;
import com.ruoyi.staff_management.domain.RyglAddEmployee;
import java.util.List;
/**
* @author 86151
* @description é’ˆå¯¹è¡¨ã€rygl_add_employee】的数据库操作Mapper
* @createDate 2025-06-23 16:05:34
* @Entity staff_management.domain.RyglAddEmployee
*/
public interface RyglAddEmployeeMapper {
    //获取所有员工信息
    List<RyglAddEmployee> getAllEmployees();
    int deleteByPrimaryKey(Long id);//删除员工信息
//    int insert(RyglAddEmployee record);//添加员工信息
    int insertSelective(RyglAddEmployee record);//添加员工信息
    RyglAddEmployee selectByPrimaryKey(Long id);//根据id查询员工信息
    int updateByPrimaryKeySelective(RyglAddEmployee record);//修改员工信息
    List<RyglAddEmployee> searchByName(String name);
//    int updateByPrimaryKey(RyglAddEmployee record);//修改员工信息
}
src/main/java/com/ruoyi/staff_management/service/RyglAddEmployeeService.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,20 @@
package com.ruoyi.staff_management.service;
import com.ruoyi.staff_management.domain.RyglAddEmployee;
import java.util.List;
public interface RyglAddEmployeeService {
    List<RyglAddEmployee> getAllEmployees();
    RyglAddEmployee getById(Long id);
    boolean save(RyglAddEmployee employee);
    boolean updateById(RyglAddEmployee employee);
    boolean removeById(Long id);
    List<RyglAddEmployee> searchByName(String name);
}
src/main/java/com/ruoyi/staff_management/service/impl/RyglAddEmployeeServiceImpl.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,61 @@
package com.ruoyi.staff_management.service.impl;
import com.ruoyi.staff_management.domain.RyglAddEmployee;
import com.ruoyi.staff_management.mapper.RyglAddEmployeeMapper;
import com.ruoyi.staff_management.service.RyglAddEmployeeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
@Service
public class RyglAddEmployeeServiceImpl implements RyglAddEmployeeService {
    @Autowired
    private RyglAddEmployeeMapper ryglAddEmployeeMapper;
    @Override
    public List<RyglAddEmployee> getAllEmployees() {
        List<RyglAddEmployee> allEmployees = ryglAddEmployeeMapper.getAllEmployees();
        return allEmployees;
    }
    @Override
    public RyglAddEmployee getById(Long id) {
        RyglAddEmployee ryglAddEmployee = ryglAddEmployeeMapper.selectByPrimaryKey(id);
        return ryglAddEmployee;
    }
    @Override
    public boolean save(RyglAddEmployee employee) {
        int i = ryglAddEmployeeMapper.insertSelective(employee);
        if (i>0){
            return true;
        }
        return false;
    }
    @Override
    public boolean updateById(RyglAddEmployee employee) {
        int i = ryglAddEmployeeMapper.updateByPrimaryKeySelective(employee);
        if (i>0){
            return true;
        }
        return false;
    }
    @Override
    public boolean removeById(Long id) {
        int i = ryglAddEmployeeMapper.deleteByPrimaryKey(id);
        if (i>0){
            return true;
        }
        return false;
    }
    @Override
    public List<RyglAddEmployee> searchByName(String name) {
        List<RyglAddEmployee> ryglAddEmployees = ryglAddEmployeeMapper.searchByName(name);
        return ryglAddEmployees;
    }
}
src/main/resources/application-druid.yml
@@ -6,8 +6,8 @@
        druid:
            # ä¸»åº“数据源
            master:
#                url: jdbc:mysql://localhost:3306/ry-vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
                url: jdbc:mysql://114.132.189.42:9004/product-inventory-management?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
#                url: jdbc:mysql://localhost:3306/product-inventory-management?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
                url: jdbc:mysql://114.132.189.42:9004/product-inventory-management-copy?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
                username: root
                password: 123456
            # ä»Žåº“数据源
src/main/resources/application.yml
@@ -75,7 +75,7 @@
    # æ•°æ®åº“索引
    database: 0
    # å¯†ç 
    password: root2022!
#    password: root2022!
    # è¿žæŽ¥è¶…æ—¶æ—¶é—´
    timeout: 10s
    lettuce:
src/main/resources/mapper/StockInMapper.xml
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,130 @@
<?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="inventory.mapper.StockInMapper">
    <resultMap id="BaseResultMap" type="inventory.domain.StockIn">
            <id property="id" column="id" jdbcType="INTEGER"/>
            <result property="productId" column="product_id" jdbcType="INTEGER"/>
            <result property="inboundTime" column="inbound_time" jdbcType="TIMESTAMP"/>
            <result property="inboundBatch" column="inbound_batch" jdbcType="VARCHAR"/>
            <result property="supplierName" column="supplier_name" jdbcType="VARCHAR"/>
            <result property="inboundQuantity" column="inbound_quantity" jdbcType="INTEGER"/>
            <result property="taxInclusivePrice" column="tax_inclusive_price" jdbcType="DECIMAL"/>
            <result property="taxInclusiveTotal" column="tax_inclusive_total" jdbcType="DECIMAL"/>
            <result property="taxRate" column="tax_rate" jdbcType="DECIMAL"/>
            <result property="taxExclusiveTotal" column="tax_exclusive_total" jdbcType="DECIMAL"/>
            <result property="inboundPerson" column="inbound_person" jdbcType="VARCHAR"/>
    </resultMap>
    <sql id="Base_Column_List">
        id,product_id,inbound_time,
        inbound_batch,supplier_name,inbound_quantity,
        tax_inclusive_price,tax_inclusive_total,tax_rate,
        tax_exclusive_total,inbound_person
    </sql>
    <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
        select
        <include refid="Base_Column_List" />
        from stock_in
        where  id = #{id,jdbcType=INTEGER}
    </select>
    <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
        delete from stock_in
        where  id = #{id,jdbcType=INTEGER}
    </delete>
    <insert id="insert" keyColumn="id" keyProperty="id" parameterType="inventory.domain.StockIn" useGeneratedKeys="true">
        insert into stock_in
        ( id,product_id,inbound_time
        ,inbound_batch,supplier_name,inbound_quantity
        ,tax_inclusive_price,tax_inclusive_total,tax_rate
        ,tax_exclusive_total,inbound_person)
        values (#{id,jdbcType=INTEGER},#{productId,jdbcType=INTEGER},#{inboundTime,jdbcType=TIMESTAMP}
        ,#{inboundBatch,jdbcType=VARCHAR},#{supplierName,jdbcType=VARCHAR},#{inboundQuantity,jdbcType=INTEGER}
        ,#{taxInclusivePrice,jdbcType=DECIMAL},#{taxInclusiveTotal,jdbcType=DECIMAL},#{taxRate,jdbcType=DECIMAL}
        ,#{taxExclusiveTotal,jdbcType=DECIMAL},#{inboundPerson,jdbcType=VARCHAR})
    </insert>
    <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="inventory.domain.StockIn" useGeneratedKeys="true">
        insert into stock_in
        <trim prefix="(" suffix=")" suffixOverrides=",">
                <if test="id != null">id,</if>
                <if test="productId != null">product_id,</if>
                <if test="inboundTime != null">inbound_time,</if>
                <if test="inboundBatch != null">inbound_batch,</if>
                <if test="supplierName != null">supplier_name,</if>
                <if test="inboundQuantity != null">inbound_quantity,</if>
                <if test="taxInclusivePrice != null">tax_inclusive_price,</if>
                <if test="taxInclusiveTotal != null">tax_inclusive_total,</if>
                <if test="taxRate != null">tax_rate,</if>
                <if test="taxExclusiveTotal != null">tax_exclusive_total,</if>
                <if test="inboundPerson != null">inbound_person,</if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
                <if test="id != null">#{id,jdbcType=INTEGER},</if>
                <if test="productId != null">#{productId,jdbcType=INTEGER},</if>
                <if test="inboundTime != null">#{inboundTime,jdbcType=TIMESTAMP},</if>
                <if test="inboundBatch != null">#{inboundBatch,jdbcType=VARCHAR},</if>
                <if test="supplierName != null">#{supplierName,jdbcType=VARCHAR},</if>
                <if test="inboundQuantity != null">#{inboundQuantity,jdbcType=INTEGER},</if>
                <if test="taxInclusivePrice != null">#{taxInclusivePrice,jdbcType=DECIMAL},</if>
                <if test="taxInclusiveTotal != null">#{taxInclusiveTotal,jdbcType=DECIMAL},</if>
                <if test="taxRate != null">#{taxRate,jdbcType=DECIMAL},</if>
                <if test="taxExclusiveTotal != null">#{taxExclusiveTotal,jdbcType=DECIMAL},</if>
                <if test="inboundPerson != null">#{inboundPerson,jdbcType=VARCHAR},</if>
        </trim>
    </insert>
    <update id="updateByPrimaryKeySelective" parameterType="inventory.domain.StockIn">
        update stock_in
        <set>
                <if test="productId != null">
                    product_id = #{productId,jdbcType=INTEGER},
                </if>
                <if test="inboundTime != null">
                    inbound_time = #{inboundTime,jdbcType=TIMESTAMP},
                </if>
                <if test="inboundBatch != null">
                    inbound_batch = #{inboundBatch,jdbcType=VARCHAR},
                </if>
                <if test="supplierName != null">
                    supplier_name = #{supplierName,jdbcType=VARCHAR},
                </if>
                <if test="inboundQuantity != null">
                    inbound_quantity = #{inboundQuantity,jdbcType=INTEGER},
                </if>
                <if test="taxInclusivePrice != null">
                    tax_inclusive_price = #{taxInclusivePrice,jdbcType=DECIMAL},
                </if>
                <if test="taxInclusiveTotal != null">
                    tax_inclusive_total = #{taxInclusiveTotal,jdbcType=DECIMAL},
                </if>
                <if test="taxRate != null">
                    tax_rate = #{taxRate,jdbcType=DECIMAL},
                </if>
                <if test="taxExclusiveTotal != null">
                    tax_exclusive_total = #{taxExclusiveTotal,jdbcType=DECIMAL},
                </if>
                <if test="inboundPerson != null">
                    inbound_person = #{inboundPerson,jdbcType=VARCHAR},
                </if>
        </set>
        where   id = #{id,jdbcType=INTEGER}
    </update>
    <update id="updateByPrimaryKey" parameterType="inventory.domain.StockIn">
        update stock_in
        set
            product_id =  #{productId,jdbcType=INTEGER},
            inbound_time =  #{inboundTime,jdbcType=TIMESTAMP},
            inbound_batch =  #{inboundBatch,jdbcType=VARCHAR},
            supplier_name =  #{supplierName,jdbcType=VARCHAR},
            inbound_quantity =  #{inboundQuantity,jdbcType=INTEGER},
            tax_inclusive_price =  #{taxInclusivePrice,jdbcType=DECIMAL},
            tax_inclusive_total =  #{taxInclusiveTotal,jdbcType=DECIMAL},
            tax_rate =  #{taxRate,jdbcType=DECIMAL},
            tax_exclusive_total =  #{taxExclusiveTotal,jdbcType=DECIMAL},
            inbound_person =  #{inboundPerson,jdbcType=VARCHAR}
        where   id = #{id,jdbcType=INTEGER}
    </update>
</mapper>
src/main/resources/mapper/StockManagementMapper.xml
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,106 @@
<?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="inventory.mapper.StockManagementMapper">
    <resultMap id="BaseResultMap" type="inventory.domain.StockManagement">
            <id property="id" column="id" jdbcType="INTEGER"/>
            <result property="productId" column="product_id" jdbcType="INTEGER"/>
            <result property="stockQuantity" column="stock_quantity" jdbcType="INTEGER"/>
            <result property="taxInclusivePrice" column="tax_inclusive_price" jdbcType="DECIMAL"/>
            <result property="taxInclusiveTotal" column="tax_inclusive_total" jdbcType="DECIMAL"/>
            <result property="taxRate" column="tax_rate" jdbcType="DECIMAL"/>
            <result property="taxExclusiveTotal" column="tax_exclusive_total" jdbcType="DECIMAL"/>
            <result property="inboundPerson" column="inbound_person" jdbcType="VARCHAR"/>
    </resultMap>
    <sql id="Base_Column_List">
        id,product_id,stock_quantity,
        tax_inclusive_price,tax_inclusive_total,tax_rate,
        tax_exclusive_total,inbound_person
    </sql>
    <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
        select
        <include refid="Base_Column_List" />
        from stock_management
        where  id = #{id,jdbcType=INTEGER}
    </select>
    <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
        delete from stock_management
        where  id = #{id,jdbcType=INTEGER}
    </delete>
    <insert id="insert" keyColumn="id" keyProperty="id" parameterType="inventory.domain.StockManagement" useGeneratedKeys="true">
        insert into stock_management
        ( id,product_id,stock_quantity
        ,tax_inclusive_price,tax_inclusive_total,tax_rate
        ,tax_exclusive_total,inbound_person)
        values (#{id,jdbcType=INTEGER},#{productId,jdbcType=INTEGER},#{stockQuantity,jdbcType=INTEGER}
        ,#{taxInclusivePrice,jdbcType=DECIMAL},#{taxInclusiveTotal,jdbcType=DECIMAL},#{taxRate,jdbcType=DECIMAL}
        ,#{taxExclusiveTotal,jdbcType=DECIMAL},#{inboundPerson,jdbcType=VARCHAR})
    </insert>
    <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="inventory.domain.StockManagement" useGeneratedKeys="true">
        insert into stock_management
        <trim prefix="(" suffix=")" suffixOverrides=",">
                <if test="id != null">id,</if>
                <if test="productId != null">product_id,</if>
                <if test="stockQuantity != null">stock_quantity,</if>
                <if test="taxInclusivePrice != null">tax_inclusive_price,</if>
                <if test="taxInclusiveTotal != null">tax_inclusive_total,</if>
                <if test="taxRate != null">tax_rate,</if>
                <if test="taxExclusiveTotal != null">tax_exclusive_total,</if>
                <if test="inboundPerson != null">inbound_person,</if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
                <if test="id != null">#{id,jdbcType=INTEGER},</if>
                <if test="productId != null">#{productId,jdbcType=INTEGER},</if>
                <if test="stockQuantity != null">#{stockQuantity,jdbcType=INTEGER},</if>
                <if test="taxInclusivePrice != null">#{taxInclusivePrice,jdbcType=DECIMAL},</if>
                <if test="taxInclusiveTotal != null">#{taxInclusiveTotal,jdbcType=DECIMAL},</if>
                <if test="taxRate != null">#{taxRate,jdbcType=DECIMAL},</if>
                <if test="taxExclusiveTotal != null">#{taxExclusiveTotal,jdbcType=DECIMAL},</if>
                <if test="inboundPerson != null">#{inboundPerson,jdbcType=VARCHAR},</if>
        </trim>
    </insert>
    <update id="updateByPrimaryKeySelective" parameterType="inventory.domain.StockManagement">
        update stock_management
        <set>
                <if test="productId != null">
                    product_id = #{productId,jdbcType=INTEGER},
                </if>
                <if test="stockQuantity != null">
                    stock_quantity = #{stockQuantity,jdbcType=INTEGER},
                </if>
                <if test="taxInclusivePrice != null">
                    tax_inclusive_price = #{taxInclusivePrice,jdbcType=DECIMAL},
                </if>
                <if test="taxInclusiveTotal != null">
                    tax_inclusive_total = #{taxInclusiveTotal,jdbcType=DECIMAL},
                </if>
                <if test="taxRate != null">
                    tax_rate = #{taxRate,jdbcType=DECIMAL},
                </if>
                <if test="taxExclusiveTotal != null">
                    tax_exclusive_total = #{taxExclusiveTotal,jdbcType=DECIMAL},
                </if>
                <if test="inboundPerson != null">
                    inbound_person = #{inboundPerson,jdbcType=VARCHAR},
                </if>
        </set>
        where   id = #{id,jdbcType=INTEGER}
    </update>
    <update id="updateByPrimaryKey" parameterType="inventory.domain.StockManagement">
        update stock_management
        set
            product_id =  #{productId,jdbcType=INTEGER},
            stock_quantity =  #{stockQuantity,jdbcType=INTEGER},
            tax_inclusive_price =  #{taxInclusivePrice,jdbcType=DECIMAL},
            tax_inclusive_total =  #{taxInclusiveTotal,jdbcType=DECIMAL},
            tax_rate =  #{taxRate,jdbcType=DECIMAL},
            tax_exclusive_total =  #{taxExclusiveTotal,jdbcType=DECIMAL},
            inbound_person =  #{inboundPerson,jdbcType=VARCHAR}
        where   id = #{id,jdbcType=INTEGER}
    </update>
</mapper>
src/main/resources/mapper/StockOutMapper.xml
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,130 @@
<?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="inventory.mapper.StockOutMapper">
    <resultMap id="BaseResultMap" type="inventory.domain.StockOut">
            <id property="id" column="id" jdbcType="INTEGER"/>
            <result property="productId" column="product_id" jdbcType="INTEGER"/>
            <result property="inboundTime" column="inbound_time" jdbcType="TIMESTAMP"/>
            <result property="inboundBatch" column="inbound_batch" jdbcType="VARCHAR"/>
            <result property="supplierName" column="supplier_name" jdbcType="VARCHAR"/>
            <result property="inboundQuantity" column="inbound_quantity" jdbcType="INTEGER"/>
            <result property="taxInclusivePrice" column="tax_inclusive_price" jdbcType="DECIMAL"/>
            <result property="taxInclusiveTotal" column="tax_inclusive_total" jdbcType="DECIMAL"/>
            <result property="taxRate" column="tax_rate" jdbcType="DECIMAL"/>
            <result property="taxExclusiveTotal" column="tax_exclusive_total" jdbcType="DECIMAL"/>
            <result property="inboundPerson" column="inbound_person" jdbcType="VARCHAR"/>
    </resultMap>
    <sql id="Base_Column_List">
        id,product_id,inbound_time,
        inbound_batch,supplier_name,inbound_quantity,
        tax_inclusive_price,tax_inclusive_total,tax_rate,
        tax_exclusive_total,inbound_person
    </sql>
    <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
        select
        <include refid="Base_Column_List" />
        from stock_out
        where  id = #{id,jdbcType=INTEGER}
    </select>
    <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
        delete from stock_out
        where  id = #{id,jdbcType=INTEGER}
    </delete>
    <insert id="insert" keyColumn="id" keyProperty="id" parameterType="inventory.domain.StockOut" useGeneratedKeys="true">
        insert into stock_out
        ( id,product_id,inbound_time
        ,inbound_batch,supplier_name,inbound_quantity
        ,tax_inclusive_price,tax_inclusive_total,tax_rate
        ,tax_exclusive_total,inbound_person)
        values (#{id,jdbcType=INTEGER},#{productId,jdbcType=INTEGER},#{inboundTime,jdbcType=TIMESTAMP}
        ,#{inboundBatch,jdbcType=VARCHAR},#{supplierName,jdbcType=VARCHAR},#{inboundQuantity,jdbcType=INTEGER}
        ,#{taxInclusivePrice,jdbcType=DECIMAL},#{taxInclusiveTotal,jdbcType=DECIMAL},#{taxRate,jdbcType=DECIMAL}
        ,#{taxExclusiveTotal,jdbcType=DECIMAL},#{inboundPerson,jdbcType=VARCHAR})
    </insert>
    <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="inventory.domain.StockOut" useGeneratedKeys="true">
        insert into stock_out
        <trim prefix="(" suffix=")" suffixOverrides=",">
                <if test="id != null">id,</if>
                <if test="productId != null">product_id,</if>
                <if test="inboundTime != null">inbound_time,</if>
                <if test="inboundBatch != null">inbound_batch,</if>
                <if test="supplierName != null">supplier_name,</if>
                <if test="inboundQuantity != null">inbound_quantity,</if>
                <if test="taxInclusivePrice != null">tax_inclusive_price,</if>
                <if test="taxInclusiveTotal != null">tax_inclusive_total,</if>
                <if test="taxRate != null">tax_rate,</if>
                <if test="taxExclusiveTotal != null">tax_exclusive_total,</if>
                <if test="inboundPerson != null">inbound_person,</if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
                <if test="id != null">#{id,jdbcType=INTEGER},</if>
                <if test="productId != null">#{productId,jdbcType=INTEGER},</if>
                <if test="inboundTime != null">#{inboundTime,jdbcType=TIMESTAMP},</if>
                <if test="inboundBatch != null">#{inboundBatch,jdbcType=VARCHAR},</if>
                <if test="supplierName != null">#{supplierName,jdbcType=VARCHAR},</if>
                <if test="inboundQuantity != null">#{inboundQuantity,jdbcType=INTEGER},</if>
                <if test="taxInclusivePrice != null">#{taxInclusivePrice,jdbcType=DECIMAL},</if>
                <if test="taxInclusiveTotal != null">#{taxInclusiveTotal,jdbcType=DECIMAL},</if>
                <if test="taxRate != null">#{taxRate,jdbcType=DECIMAL},</if>
                <if test="taxExclusiveTotal != null">#{taxExclusiveTotal,jdbcType=DECIMAL},</if>
                <if test="inboundPerson != null">#{inboundPerson,jdbcType=VARCHAR},</if>
        </trim>
    </insert>
    <update id="updateByPrimaryKeySelective" parameterType="inventory.domain.StockOut">
        update stock_out
        <set>
                <if test="productId != null">
                    product_id = #{productId,jdbcType=INTEGER},
                </if>
                <if test="inboundTime != null">
                    inbound_time = #{inboundTime,jdbcType=TIMESTAMP},
                </if>
                <if test="inboundBatch != null">
                    inbound_batch = #{inboundBatch,jdbcType=VARCHAR},
                </if>
                <if test="supplierName != null">
                    supplier_name = #{supplierName,jdbcType=VARCHAR},
                </if>
                <if test="inboundQuantity != null">
                    inbound_quantity = #{inboundQuantity,jdbcType=INTEGER},
                </if>
                <if test="taxInclusivePrice != null">
                    tax_inclusive_price = #{taxInclusivePrice,jdbcType=DECIMAL},
                </if>
                <if test="taxInclusiveTotal != null">
                    tax_inclusive_total = #{taxInclusiveTotal,jdbcType=DECIMAL},
                </if>
                <if test="taxRate != null">
                    tax_rate = #{taxRate,jdbcType=DECIMAL},
                </if>
                <if test="taxExclusiveTotal != null">
                    tax_exclusive_total = #{taxExclusiveTotal,jdbcType=DECIMAL},
                </if>
                <if test="inboundPerson != null">
                    inbound_person = #{inboundPerson,jdbcType=VARCHAR},
                </if>
        </set>
        where   id = #{id,jdbcType=INTEGER}
    </update>
    <update id="updateByPrimaryKey" parameterType="inventory.domain.StockOut">
        update stock_out
        set
            product_id =  #{productId,jdbcType=INTEGER},
            inbound_time =  #{inboundTime,jdbcType=TIMESTAMP},
            inbound_batch =  #{inboundBatch,jdbcType=VARCHAR},
            supplier_name =  #{supplierName,jdbcType=VARCHAR},
            inbound_quantity =  #{inboundQuantity,jdbcType=INTEGER},
            tax_inclusive_price =  #{taxInclusivePrice,jdbcType=DECIMAL},
            tax_inclusive_total =  #{taxInclusiveTotal,jdbcType=DECIMAL},
            tax_rate =  #{taxRate,jdbcType=DECIMAL},
            tax_exclusive_total =  #{taxExclusiveTotal,jdbcType=DECIMAL},
            inbound_person =  #{inboundPerson,jdbcType=VARCHAR}
        where   id = #{id,jdbcType=INTEGER}
    </update>
</mapper>
src/main/resources/mapper/StockProductMapper.xml
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,75 @@
<?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="inventory.mapper.StockProductMapper">
    <resultMap id="BaseResultMap" type="inventory.domain.StockProduct">
            <id property="id" column="id" jdbcType="INTEGER"/>
            <result property="productCategory" column="product_category" jdbcType="VARCHAR"/>
            <result property="specModel" column="spec_model" jdbcType="VARCHAR"/>
            <result property="unit" column="unit" jdbcType="VARCHAR"/>
    </resultMap>
    <sql id="Base_Column_List">
        id,product_category,spec_model,
        unit
    </sql>
    <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
        select
        <include refid="Base_Column_List" />
        from stock_product
        where  id = #{id,jdbcType=INTEGER}
    </select>
    <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
        delete from stock_product
        where  id = #{id,jdbcType=INTEGER}
    </delete>
    <insert id="insert" keyColumn="id" keyProperty="id" parameterType="inventory.domain.StockProduct" useGeneratedKeys="true">
        insert into stock_product
        ( id,product_category,spec_model
        ,unit)
        values (#{id,jdbcType=INTEGER},#{productCategory,jdbcType=VARCHAR},#{specModel,jdbcType=VARCHAR}
        ,#{unit,jdbcType=VARCHAR})
    </insert>
    <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="inventory.domain.StockProduct" useGeneratedKeys="true">
        insert into stock_product
        <trim prefix="(" suffix=")" suffixOverrides=",">
                <if test="id != null">id,</if>
                <if test="productCategory != null">product_category,</if>
                <if test="specModel != null">spec_model,</if>
                <if test="unit != null">unit,</if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
                <if test="id != null">#{id,jdbcType=INTEGER},</if>
                <if test="productCategory != null">#{productCategory,jdbcType=VARCHAR},</if>
                <if test="specModel != null">#{specModel,jdbcType=VARCHAR},</if>
                <if test="unit != null">#{unit,jdbcType=VARCHAR},</if>
        </trim>
    </insert>
    <update id="updateByPrimaryKeySelective" parameterType="inventory.domain.StockProduct">
        update stock_product
        <set>
                <if test="productCategory != null">
                    product_category = #{productCategory,jdbcType=VARCHAR},
                </if>
                <if test="specModel != null">
                    spec_model = #{specModel,jdbcType=VARCHAR},
                </if>
                <if test="unit != null">
                    unit = #{unit,jdbcType=VARCHAR},
                </if>
        </set>
        where   id = #{id,jdbcType=INTEGER}
    </update>
    <update id="updateByPrimaryKey" parameterType="inventory.domain.StockProduct">
        update stock_product
        set
            product_category =  #{productCategory,jdbcType=VARCHAR},
            spec_model =  #{specModel,jdbcType=VARCHAR},
            unit =  #{unit,jdbcType=VARCHAR}
        where   id = #{id,jdbcType=INTEGER}
    </update>
</mapper>
src/main/resources/mapper/staff_management/RyglAddEmployeeMapper.xml
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,194 @@
<?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.ruoyi.staff_management.mapper.RyglAddEmployeeMapper">
    <resultMap id="BaseResultMap" type="staff_management.domain.RyglAddEmployee">
            <id property="id" column="id" jdbcType="INTEGER"/>
            <result property="status" column="status" jdbcType="INTEGER"/>
            <result property="employeeNumber" column="employee_number" jdbcType="VARCHAR"/>
            <result property="name" column="name" jdbcType="VARCHAR"/>
            <result property="sex" column="sex" jdbcType="VARCHAR"/>
            <result property="nativePlace" column="native_place" jdbcType="VARCHAR"/>
            <result property="post" column="post" jdbcType="VARCHAR"/>
            <result property="homeAddress" column="home_address" jdbcType="VARCHAR"/>
            <result property="firstDegree" column="first_degree" jdbcType="VARCHAR"/>
            <result property="major" column="major" jdbcType="VARCHAR"/>
            <result property="idNumber" column="id_number" jdbcType="INTEGER"/>
            <result property="age" column="age" jdbcType="INTEGER"/>
            <result property="contactNumber" column="contact_number" jdbcType="INTEGER"/>
            <result property="emergencyContact" column="emergency_contact" jdbcType="VARCHAR"/>
            <result property="emergencyContactNumber" column="emergency_contact_number" jdbcType="INTEGER"/>
            <result property="contractTerm" column="contract_term" jdbcType="VARCHAR"/>
            <result property="contractStartDate" column="contract_start_date" jdbcType="TIMESTAMP"/>
            <result property="contractEndDate" column="contract_end_date" jdbcType="TIMESTAMP"/>
    </resultMap>
    <sql id="Base_Column_List">
        id,status,employee_number,
        name,sex,native_place,
        post,home_address,first_degree,
        major,id_number,age,
        contact_number,emergency_contact,emergency_contact_number,
        contract_term,contract_start_date,contract_end_date
    </sql>
    <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
        select
        <include refid="Base_Column_List" />
        from rygl_add_employee
        where  id = #{id,jdbcType=INTEGER}
    </select>
    <select id="getAllEmployees" resultType="com.ruoyi.staff_management.domain.RyglAddEmployee">
        SELECT * FROM rygl_add_employee
    </select>
    <select id="searchByName" resultType="com.ruoyi.staff_management.domain.RyglAddEmployee">
        SELECT * FROM rygl_add_employee WHERE name LIKE CONCAT('%', #{name}, '%')
    </select>
    <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
        delete from rygl_add_employee
        where  id = #{id,jdbcType=INTEGER}
    </delete>
    <insert id="insert" keyColumn="id" keyProperty="id" parameterType="staff_management.domain.RyglAddEmployee" useGeneratedKeys="true">
        insert into rygl_add_employee
        ( id,status,employee_number
        ,name,sex,native_place
        ,post,home_address,first_degree
        ,major,id_number,age
        ,contact_number,emergency_contact,emergency_contact_number
        ,contract_term,contract_start_date,contract_end_date
        )
        values (#{id,jdbcType=INTEGER},#{status,jdbcType=INTEGER},#{employeeNumber,jdbcType=VARCHAR}
        ,#{name,jdbcType=VARCHAR},#{sex,jdbcType=VARCHAR},#{nativePlace,jdbcType=VARCHAR}
        ,#{post,jdbcType=VARCHAR},#{homeAddress,jdbcType=VARCHAR},#{firstDegree,jdbcType=VARCHAR}
        ,#{major,jdbcType=VARCHAR},#{idNumber,jdbcType=INTEGER},#{age,jdbcType=INTEGER}
        ,#{contactNumber,jdbcType=INTEGER},#{emergencyContact,jdbcType=VARCHAR},#{emergencyContactNumber,jdbcType=INTEGER}
        ,#{contractTerm,jdbcType=VARCHAR},#{contractStartDate,jdbcType=TIMESTAMP},#{contractEndDate,jdbcType=TIMESTAMP}
        )
    </insert>
    <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="staff_management.domain.RyglAddEmployee" useGeneratedKeys="true">
        insert into rygl_add_employee
        <trim prefix="(" suffix=")" suffixOverrides=",">
                <if test="id != null">id,</if>
                <if test="status != null">status,</if>
                <if test="employeeNumber != null">employee_number,</if>
                <if test="name != null">name,</if>
                <if test="sex != null">sex,</if>
                <if test="nativePlace != null">native_place,</if>
                <if test="post != null">post,</if>
                <if test="homeAddress != null">home_address,</if>
                <if test="firstDegree != null">first_degree,</if>
                <if test="major != null">major,</if>
                <if test="idNumber != null">id_number,</if>
                <if test="age != null">age,</if>
                <if test="contactNumber != null">contact_number,</if>
                <if test="emergencyContact != null">emergency_contact,</if>
                <if test="emergencyContactNumber != null">emergency_contact_number,</if>
                <if test="contractTerm != null">contract_term,</if>
                <if test="contractStartDate != null">contract_start_date,</if>
                <if test="contractEndDate != null">contract_end_date,</if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
                <if test="id != null">#{id,jdbcType=INTEGER},</if>
                <if test="status != null">#{status,jdbcType=INTEGER},</if>
                <if test="employeeNumber != null">#{employeeNumber,jdbcType=VARCHAR},</if>
                <if test="name != null">#{name,jdbcType=VARCHAR},</if>
                <if test="sex != null">#{sex,jdbcType=VARCHAR},</if>
                <if test="nativePlace != null">#{nativePlace,jdbcType=VARCHAR},</if>
                <if test="post != null">#{post,jdbcType=VARCHAR},</if>
                <if test="homeAddress != null">#{homeAddress,jdbcType=VARCHAR},</if>
                <if test="firstDegree != null">#{firstDegree,jdbcType=VARCHAR},</if>
                <if test="major != null">#{major,jdbcType=VARCHAR},</if>
                <if test="idNumber != null">#{idNumber,jdbcType=INTEGER},</if>
                <if test="age != null">#{age,jdbcType=INTEGER},</if>
                <if test="contactNumber != null">#{contactNumber,jdbcType=INTEGER},</if>
                <if test="emergencyContact != null">#{emergencyContact,jdbcType=VARCHAR},</if>
                <if test="emergencyContactNumber != null">#{emergencyContactNumber,jdbcType=INTEGER},</if>
                <if test="contractTerm != null">#{contractTerm,jdbcType=VARCHAR},</if>
                <if test="contractStartDate != null">#{contractStartDate,jdbcType=TIMESTAMP},</if>
                <if test="contractEndDate != null">#{contractEndDate,jdbcType=TIMESTAMP},</if>
        </trim>
    </insert>
    <update id="updateByPrimaryKeySelective" parameterType="staff_management.domain.RyglAddEmployee">
        update rygl_add_employee
        <set>
                <if test="status != null">
                    status = #{status,jdbcType=INTEGER},
                </if>
                <if test="employeeNumber != null">
                    employee_number = #{employeeNumber,jdbcType=VARCHAR},
                </if>
                <if test="name != null">
                    name = #{name,jdbcType=VARCHAR},
                </if>
                <if test="sex != null">
                    sex = #{sex,jdbcType=VARCHAR},
                </if>
                <if test="nativePlace != null">
                    native_place = #{nativePlace,jdbcType=VARCHAR},
                </if>
                <if test="post != null">
                    post = #{post,jdbcType=VARCHAR},
                </if>
                <if test="homeAddress != null">
                    home_address = #{homeAddress,jdbcType=VARCHAR},
                </if>
                <if test="firstDegree != null">
                    first_degree = #{firstDegree,jdbcType=VARCHAR},
                </if>
                <if test="major != null">
                    major = #{major,jdbcType=VARCHAR},
                </if>
                <if test="idNumber != null">
                    id_number = #{idNumber,jdbcType=INTEGER},
                </if>
                <if test="age != null">
                    age = #{age,jdbcType=INTEGER},
                </if>
                <if test="contactNumber != null">
                    contact_number = #{contactNumber,jdbcType=INTEGER},
                </if>
                <if test="emergencyContact != null">
                    emergency_contact = #{emergencyContact,jdbcType=VARCHAR},
                </if>
                <if test="emergencyContactNumber != null">
                    emergency_contact_number = #{emergencyContactNumber,jdbcType=INTEGER},
                </if>
                <if test="contractTerm != null">
                    contract_term = #{contractTerm,jdbcType=VARCHAR},
                </if>
                <if test="contractStartDate != null">
                    contract_start_date = #{contractStartDate,jdbcType=TIMESTAMP},
                </if>
                <if test="contractEndDate != null">
                    contract_end_date = #{contractEndDate,jdbcType=TIMESTAMP},
                </if>
        </set>
        where   id = #{id,jdbcType=INTEGER}
    </update>
    <update id="updateByPrimaryKey" parameterType="staff_management.domain.RyglAddEmployee">
        update rygl_add_employee
        set
            status =  #{status,jdbcType=INTEGER},
            employee_number =  #{employeeNumber,jdbcType=VARCHAR},
            name =  #{name,jdbcType=VARCHAR},
            sex =  #{sex,jdbcType=VARCHAR},
            native_place =  #{nativePlace,jdbcType=VARCHAR},
            post =  #{post,jdbcType=VARCHAR},
            home_address =  #{homeAddress,jdbcType=VARCHAR},
            first_degree =  #{firstDegree,jdbcType=VARCHAR},
            major =  #{major,jdbcType=VARCHAR},
            id_number =  #{idNumber,jdbcType=INTEGER},
            age =  #{age,jdbcType=INTEGER},
            contact_number =  #{contactNumber,jdbcType=INTEGER},
            emergency_contact =  #{emergencyContact,jdbcType=VARCHAR},
            emergency_contact_number =  #{emergencyContactNumber,jdbcType=INTEGER},
            contract_term =  #{contractTerm,jdbcType=VARCHAR},
            contract_start_date =  #{contractStartDate,jdbcType=TIMESTAMP},
            contract_end_date =  #{contractEndDate,jdbcType=TIMESTAMP}
        where   id = #{id,jdbcType=INTEGER}
    </update>
</mapper>