From c4aec3aa2d6c7c91b67d32ef625fe9e1f457177f Mon Sep 17 00:00:00 2001 From: liyong <18434998025@163.com> Date: 星期二, 24 六月 2025 17:34:23 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- src/main/java/com/ruoyi/staff_management/controller/RyglAddEmployeeController.java | 94 ++++ src/main/java/com/ruoyi/inventory/domain/StockIn.java | 70 +++ src/main/resources/mapper/staff_management/RyglAddEmployeeMapper.xml | 194 ++++++++ src/main/java/com/ruoyi/inventory/mapper/StockManagementMapper.java | 25 + src/main/java/com/ruoyi/staff_management/mapper/RyglAddEmployeeMapper.java | 30 + src/main/java/com/ruoyi/inventory/mapper/StockOutMapper.java | 25 + src/main/java/com/ruoyi/staff_management/service/impl/RyglAddEmployeeServiceImpl.java | 61 ++ src/main/java/com/ruoyi/inventory/domain/StockManagement.java | 54 ++ src/main/java/com/ruoyi/inventory/mapper/StockInMapper.java | 25 + src/main/resources/application-druid.yml | 4 src/main/java/com/ruoyi/inventory/domain/StockOut.java | 70 +++ src/main/resources/mapper/StockProductMapper.xml | 75 +++ src/main/resources/mapper/StockOutMapper.xml | 130 +++++ src/main/java/com/ruoyi/staff_management/service/RyglAddEmployeeService.java | 20 src/main/resources/mapper/StockInMapper.xml | 130 +++++ src/main/java/com/ruoyi/inventory/mapper/StockProductMapper.java | 25 + src/main/resources/mapper/StockManagementMapper.xml | 106 ++++ src/main/java/com/ruoyi/inventory/domain/StockProduct.java | 33 + src/main/resources/application.yml | 2 src/main/java/com/ruoyi/staff_management/domain/RyglAddEmployee.java | 104 ++++ 20 files changed, 1,274 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/ruoyi/inventory/domain/StockIn.java b/src/main/java/com/ruoyi/inventory/domain/StockIn.java new file mode 100644 index 0000000..55d18cd --- /dev/null +++ b/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; +} \ No newline at end of file diff --git a/src/main/java/com/ruoyi/inventory/domain/StockManagement.java b/src/main/java/com/ruoyi/inventory/domain/StockManagement.java new file mode 100644 index 0000000..16ecdbc --- /dev/null +++ b/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; +} \ No newline at end of file diff --git a/src/main/java/com/ruoyi/inventory/domain/StockOut.java b/src/main/java/com/ruoyi/inventory/domain/StockOut.java new file mode 100644 index 0000000..807c58e --- /dev/null +++ b/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; +} \ No newline at end of file diff --git a/src/main/java/com/ruoyi/inventory/domain/StockProduct.java b/src/main/java/com/ruoyi/inventory/domain/StockProduct.java new file mode 100644 index 0000000..338fd25 --- /dev/null +++ b/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; +} \ No newline at end of file diff --git a/src/main/java/com/ruoyi/inventory/mapper/StockInMapper.java b/src/main/java/com/ruoyi/inventory/mapper/StockInMapper.java new file mode 100644 index 0000000..06ffe67 --- /dev/null +++ b/src/main/java/com/ruoyi/inventory/mapper/StockInMapper.java @@ -0,0 +1,25 @@ +package inventory.mapper; + +import inventory.domain.StockIn; + +/** +* @author 86151 +* @description 閽堝琛ㄣ�恠tock_in銆戠殑鏁版嵁搴撴搷浣淢apper +* @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); + +} diff --git a/src/main/java/com/ruoyi/inventory/mapper/StockManagementMapper.java b/src/main/java/com/ruoyi/inventory/mapper/StockManagementMapper.java new file mode 100644 index 0000000..32a7f5c --- /dev/null +++ b/src/main/java/com/ruoyi/inventory/mapper/StockManagementMapper.java @@ -0,0 +1,25 @@ +package inventory.mapper; + +import inventory.domain.StockManagement; + +/** +* @author 86151 +* @description 閽堝琛ㄣ�恠tock_management銆戠殑鏁版嵁搴撴搷浣淢apper +* @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); + +} diff --git a/src/main/java/com/ruoyi/inventory/mapper/StockOutMapper.java b/src/main/java/com/ruoyi/inventory/mapper/StockOutMapper.java new file mode 100644 index 0000000..e6dff2e --- /dev/null +++ b/src/main/java/com/ruoyi/inventory/mapper/StockOutMapper.java @@ -0,0 +1,25 @@ +package inventory.mapper; + +import inventory.domain.StockOut; + +/** +* @author 86151 +* @description 閽堝琛ㄣ�恠tock_out銆戠殑鏁版嵁搴撴搷浣淢apper +* @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); + +} diff --git a/src/main/java/com/ruoyi/inventory/mapper/StockProductMapper.java b/src/main/java/com/ruoyi/inventory/mapper/StockProductMapper.java new file mode 100644 index 0000000..3d7d20c --- /dev/null +++ b/src/main/java/com/ruoyi/inventory/mapper/StockProductMapper.java @@ -0,0 +1,25 @@ +package inventory.mapper; + +import inventory.domain.StockProduct; + +/** +* @author 86151 +* @description 閽堝琛ㄣ�恠tock_product銆戠殑鏁版嵁搴撴搷浣淢apper +* @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); + +} diff --git a/src/main/java/com/ruoyi/staff_management/controller/RyglAddEmployeeController.java b/src/main/java/com/ruoyi/staff_management/controller/RyglAddEmployeeController.java new file mode 100644 index 0000000..224f52d --- /dev/null +++ b/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(); +// } + +} \ No newline at end of file diff --git a/src/main/java/com/ruoyi/staff_management/domain/RyglAddEmployee.java b/src/main/java/com/ruoyi/staff_management/domain/RyglAddEmployee.java new file mode 100644 index 0000000..83bcca0 --- /dev/null +++ b/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; +} \ No newline at end of file diff --git a/src/main/java/com/ruoyi/staff_management/mapper/RyglAddEmployeeMapper.java b/src/main/java/com/ruoyi/staff_management/mapper/RyglAddEmployeeMapper.java new file mode 100644 index 0000000..40c6419 --- /dev/null +++ b/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 閽堝琛ㄣ�恟ygl_add_employee銆戠殑鏁版嵁搴撴搷浣淢apper +* @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);//淇敼鍛樺伐淇℃伅 + +} diff --git a/src/main/java/com/ruoyi/staff_management/service/RyglAddEmployeeService.java b/src/main/java/com/ruoyi/staff_management/service/RyglAddEmployeeService.java new file mode 100644 index 0000000..30b23ed --- /dev/null +++ b/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); + +} diff --git a/src/main/java/com/ruoyi/staff_management/service/impl/RyglAddEmployeeServiceImpl.java b/src/main/java/com/ruoyi/staff_management/service/impl/RyglAddEmployeeServiceImpl.java new file mode 100644 index 0000000..a7ae44a --- /dev/null +++ b/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; + } + + +} diff --git a/src/main/resources/application-druid.yml b/src/main/resources/application-druid.yml index cd32704..1869049 100644 --- a/src/main/resources/application-druid.yml +++ b/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 # 浠庡簱鏁版嵁婧� diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 9da7f90..6643c25 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -75,7 +75,7 @@ # 鏁版嵁搴撶储寮� database: 0 # 瀵嗙爜 - password: root2022! +# password: root2022! # 杩炴帴瓒呮椂鏃堕棿 timeout: 10s lettuce: diff --git a/src/main/resources/mapper/StockInMapper.xml b/src/main/resources/mapper/StockInMapper.xml new file mode 100644 index 0000000..3aa07c7 --- /dev/null +++ b/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> diff --git a/src/main/resources/mapper/StockManagementMapper.xml b/src/main/resources/mapper/StockManagementMapper.xml new file mode 100644 index 0000000..eed2424 --- /dev/null +++ b/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> diff --git a/src/main/resources/mapper/StockOutMapper.xml b/src/main/resources/mapper/StockOutMapper.xml new file mode 100644 index 0000000..f5111c5 --- /dev/null +++ b/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> diff --git a/src/main/resources/mapper/StockProductMapper.xml b/src/main/resources/mapper/StockProductMapper.xml new file mode 100644 index 0000000..c9a745a --- /dev/null +++ b/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> diff --git a/src/main/resources/mapper/staff_management/RyglAddEmployeeMapper.xml b/src/main/resources/mapper/staff_management/RyglAddEmployeeMapper.xml new file mode 100644 index 0000000..2db9406 --- /dev/null +++ b/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> -- Gitblit v1.9.3