¶Ô±ÈÐÂÎļþ |
| | |
| | | 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; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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); |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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); |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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); |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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); |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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(); |
| | | // } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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);//ä¿®æ¹åå·¥ä¿¡æ¯ |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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); |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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; |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | 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
|
| | | # ä»åºæ°æ®æº
|
| | |
| | | # æ°æ®åºç´¢å¼ |
| | | database: 0 |
| | | # å¯ç |
| | | password: root2022! |
| | | # password: root2022! |
| | | # è¿æ¥è¶
æ¶æ¶é´ |
| | | timeout: 10s |
| | | lettuce: |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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> |