| | |
| | | package com.ruoyi.inventory.controller; |
| | | |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.controller.BaseController; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.inventory.mapper.StockManagementMapper; |
| | | import com.ruoyi.inventory.mapper.StockProductMapper; |
| | | import com.ruoyi.inventory.service.StockInService; |
| | | import com.ruoyi.inventory.domain.StockIn; |
| | | import com.ruoyi.project.system.domain.SysPost; |
| | | import com.ruoyi.inventory.pojo.StockIn; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | | |
| | | @RestController |
| | |
| | | public class StockInController extends BaseController { |
| | | @Autowired |
| | | private StockInService stockInService; |
| | | @Autowired |
| | | private StockManagementMapper stockManagementMapper; |
| | | |
| | | @PostMapping("/add")// 鏂板鍏ュ簱璁板綍 |
| | | public AjaxResult addStockIn(@RequestBody StockIn stockIn) { |
| | | int i = stockInService.addStockIn(stockIn); |
| | |
| | | package com.ruoyi.inventory.controller; |
| | | |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.inventory.pojo.StockManagement; |
| | | import com.ruoyi.inventory.service.StockManagementService; |
| | | import inventory.domain.StockManagement; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | |
| | | import com.ruoyi.framework.web.controller.BaseController; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.inventory.domain.StockIn; |
| | | import com.ruoyi.inventory.mapper.StockManagementMapper; |
| | | import com.ruoyi.inventory.mapper.StockProductMapper; |
| | | import com.ruoyi.inventory.pojo.StockOut; |
| | | import com.ruoyi.inventory.service.StockOutService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | import inventory.domain.StockOut; |
| | | |
| | | |
| | | @RestController |
| | | @RequestMapping("/stockout") |
| | |
| | | package com.ruoyi.inventory.mapper; |
| | | |
| | | import com.ruoyi.inventory.domain.StockIn; |
| | | import com.ruoyi.inventory.pojo.StockIn; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | package com.ruoyi.inventory.mapper; |
| | | |
| | | import inventory.domain.StockManagement; |
| | | |
| | | import com.ruoyi.inventory.pojo.StockManagement; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | package com.ruoyi.inventory.mapper; |
| | | |
| | | import inventory.domain.StockOut; |
| | | |
| | | import com.ruoyi.inventory.pojo.StockOut; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | package com.ruoyi.inventory.mapper; |
| | | |
| | | import inventory.domain.StockProduct; |
| | | |
| | | |
| | | import com.ruoyi.inventory.pojo.StockProduct; |
| | | |
| | | import java.util.List; |
| | | |
文件名从 src/main/java/com/ruoyi/inventory/domain/StockIn.java 修改 |
| | |
| | | package com.ruoyi.inventory.domain; |
| | | package com.ruoyi.inventory.pojo; |
| | | |
| | | import java.io.Serializable; |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import inventory.domain.StockProduct; |
| | | |
| | | import lombok.Data; |
| | | |
文件名从 src/main/java/com/ruoyi/inventory/domain/StockManagement.java 修改 |
| | |
| | | package inventory.domain; |
| | | package com.ruoyi.inventory.pojo; |
| | | |
| | | import java.io.Serializable; |
| | | import java.math.BigDecimal; |
文件名从 src/main/java/com/ruoyi/inventory/domain/StockOut.java 修改 |
| | |
| | | package inventory.domain; |
| | | package com.ruoyi.inventory.pojo; |
| | | |
| | | import java.io.Serializable; |
| | | import java.math.BigDecimal; |
文件名从 src/main/java/com/ruoyi/inventory/domain/StockProduct.java 修改 |
| | |
| | | package inventory.domain; |
| | | package com.ruoyi.inventory.pojo; |
| | | |
| | | import java.io.Serializable; |
| | | import lombok.Data; |
| | |
| | | package com.ruoyi.inventory.service; |
| | | |
| | | import com.ruoyi.inventory.domain.StockIn; |
| | | import com.ruoyi.inventory.pojo.StockIn; |
| | | |
| | | |
| | | import java.util.List; |
| | |
| | | package com.ruoyi.inventory.service; |
| | | |
| | | import com.ruoyi.inventory.pojo.StockManagement; |
| | | |
| | | import java.util.List; |
| | | import inventory.domain.StockManagement; |
| | | |
| | | |
| | | public interface StockManagementService { |
| | | List<StockManagement> getStockManagements(); |
| | |
| | | package com.ruoyi.inventory.service; |
| | | |
| | | import com.ruoyi.inventory.pojo.StockOut; |
| | | |
| | | import java.util.List; |
| | | import inventory.domain.StockOut; |
| | | |
| | | public interface StockOutService { |
| | | List<StockOut> getStockOuts(); |
| | |
| | | package com.ruoyi.inventory.service.impl; |
| | | |
| | | import com.ruoyi.inventory.domain.StockIn; |
| | | import com.ruoyi.inventory.pojo.StockIn; |
| | | import com.ruoyi.inventory.mapper.StockInMapper; |
| | | import com.ruoyi.inventory.service.StockInService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | package com.ruoyi.inventory.service.impl; |
| | | |
| | | import com.ruoyi.inventory.mapper.StockManagementMapper; |
| | | import com.ruoyi.inventory.pojo.StockManagement; |
| | | import com.ruoyi.inventory.service.StockManagementService; |
| | | import inventory.domain.StockManagement; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | |
| | | package com.ruoyi.inventory.service.impl; |
| | | |
| | | import com.ruoyi.inventory.mapper.StockOutMapper; |
| | | import com.ruoyi.inventory.pojo.StockOut; |
| | | import com.ruoyi.inventory.service.StockOutService; |
| | | import inventory.domain.StockOut; |
| | | |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.inventory.mapper.StockInMapper"> |
| | | |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.inventory.domain.StockIn"> |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.inventory.pojo.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="taxRate" column="tax_rate" jdbcType="DECIMAL"/> |
| | | <result property="taxExclusiveTotal" column="tax_exclusive_total" jdbcType="DECIMAL"/> |
| | | <result property="inboundPerson" column="inbound_person" jdbcType="VARCHAR"/> |
| | | <collection property="stockProducts" ofType="com.ruoyi.inventory.domain.StockProduct" |
| | | <collection property="stockProducts" ofType="com.ruoyi.inventory.pojo.StockProduct" |
| | | select="com.ruoyi.inventory.mapper.StockProductMapper.selectByPrimaryKey" column="productId"> |
| | | <id property="id" column="productId" jdbcType="INTEGER"/> |
| | | </collection> |
| | |
| | | from stock_in |
| | | where id = #{id,jdbcType=INTEGER} |
| | | </select> |
| | | <select id="selectList" resultType="com.ruoyi.inventory.domain.StockIn"> |
| | | <select id="selectList" resultType="com.ruoyi.inventory.pojo.StockIn"> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from stock_in |
| | | </select> |
| | | <select id="selectListByPage" resultType="com.ruoyi.inventory.domain.StockIn"> |
| | | <select id="selectListByPage" resultType="com.ruoyi.inventory.pojo.StockIn"> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from stock_in |
| | |
| | | where id = #{id,jdbcType=INTEGER} |
| | | </delete> |
| | | |
| | | <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="inventory.domain.StockIn" useGeneratedKeys="true"> |
| | | <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.ruoyi.inventory.pojo.StockIn" useGeneratedKeys="true"> |
| | | insert into stock_in |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">id,</if> |
| | |
| | | </trim> |
| | | </insert> |
| | | |
| | | <update id="updateByPrimaryKeySelective" parameterType="inventory.domain.StockIn"> |
| | | <update id="updateByPrimaryKeySelective" parameterType="com.ruoyi.inventory.pojo.StockIn"> |
| | | update stock_in |
| | | <set> |
| | | <if test="productId != null"> |
| | |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.inventory.mapper.StockManagementMapper"> |
| | | |
| | | <resultMap id="BaseResultMap" type="inventory.domain.StockManagement"> |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.inventory.pojo.StockManagement"> |
| | | <id property="id" column="id" jdbcType="INTEGER"/> |
| | | <result property="productId" column="product_id" jdbcType="INTEGER"/> |
| | | <result property="stockQuantity" column="stock_quantity" jdbcType="INTEGER"/> |
| | |
| | | from stock_management |
| | | where id = #{id,jdbcType=INTEGER} |
| | | </select> |
| | | <select id="selectAll" resultType="inventory.domain.StockManagement"> |
| | | <select id="selectAll" resultType="com.ruoyi.inventory.pojo.StockManagement"> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from stock_management |
| | |
| | | where id = #{id,jdbcType=INTEGER} |
| | | </delete> |
| | | |
| | | <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="inventory.domain.StockManagement" useGeneratedKeys="true"> |
| | | <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.ruoyi.inventory.pojo.StockManagement" useGeneratedKeys="true"> |
| | | insert into stock_management |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">id,</if> |
| | |
| | | <if test="inboundPerson != null">#{inboundPerson,jdbcType=VARCHAR},</if> |
| | | </trim> |
| | | </insert> |
| | | <update id="updateByPrimaryKeySelective" parameterType="inventory.domain.StockManagement"> |
| | | <update id="updateByPrimaryKeySelective" parameterType="com.ruoyi.inventory.pojo.StockManagement"> |
| | | update stock_management |
| | | <set> |
| | | <if test="productId != null"> |
| | |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.inventory.mapper.StockOutMapper"> |
| | | |
| | | <resultMap id="BaseResultMap" type="inventory.domain.StockOut"> |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.inventory.pojo.StockOut"> |
| | | <id property="id" column="id" jdbcType="INTEGER"/> |
| | | <result property="productId" column="product_id" jdbcType="INTEGER"/> |
| | | <result property="inboundTime" column="inbound_time" jdbcType="TIMESTAMP"/> |
| | |
| | | from stock_out |
| | | where id = #{id,jdbcType=INTEGER} |
| | | </select> |
| | | <select id="selectAll" resultType="inventory.domain.StockOut"> |
| | | <select id="selectAll" resultType="com.ruoyi.inventory.pojo.StockOut"> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from stock_out |
| | |
| | | where id = #{id,jdbcType=INTEGER} |
| | | </delete> |
| | | |
| | | <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="inventory.domain.StockOut" useGeneratedKeys="true"> |
| | | <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.ruoyi.inventory.pojo.StockOut" useGeneratedKeys="true"> |
| | | insert into stock_out |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">id,</if> |
| | |
| | | <if test="inboundPerson != null">#{inboundPerson,jdbcType=VARCHAR},</if> |
| | | </trim> |
| | | </insert> |
| | | <update id="updateByPrimaryKeySelective" parameterType="inventory.domain.StockOut"> |
| | | <update id="updateByPrimaryKeySelective" parameterType="com.ruoyi.inventory.pojo.StockOut"> |
| | | update stock_out |
| | | <set> |
| | | <if test="productId != null"> |
| | |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.inventory.mapper.StockProductMapper"> |
| | | |
| | | <resultMap id="BaseResultMap" type="inventory.domain.StockProduct"> |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.inventory.pojo.StockProduct"> |
| | | <id property="id" column="id" jdbcType="INTEGER"/> |
| | | <result property="productCategory" column="product_category" jdbcType="VARCHAR"/> |
| | | <result property="specModel" column="spec_model" jdbcType="VARCHAR"/> |
| | |
| | | from stock_product |
| | | where id = #{id,jdbcType=INTEGER} |
| | | </select> |
| | | <select id="selectList" resultType="inventory.domain.StockProduct"> |
| | | <select id="selectList" resultType="com.ruoyi.inventory.pojo.StockProduct"> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from stock_product |
| | |
| | | where id = #{id,jdbcType=INTEGER} |
| | | </delete> |
| | | |
| | | <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="inventory.domain.StockProduct" useGeneratedKeys="true"> |
| | | <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.ruoyi.inventory.pojo.StockProduct" useGeneratedKeys="true"> |
| | | insert into stock_product |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">id,</if> |
| | |
| | | <if test="unit != null">#{unit,jdbcType=VARCHAR},</if> |
| | | </trim> |
| | | </insert> |
| | | <update id="updateByPrimaryKeySelective" parameterType="inventory.domain.StockProduct"> |
| | | <update id="updateByPrimaryKeySelective" parameterType="com.ruoyi.inventory.pojo.StockProduct"> |
| | | update stock_product |
| | | <set> |
| | | <if test="productCategory != null"> |
| | |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.staff_management.mapper.RyglAddEmployeeMapper"> |
| | | |
| | | <resultMap id="BaseResultMap" type="staff_management.domain.RyglAddEmployee"> |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.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"/> |
| | |
| | | where id = #{id,jdbcType=INTEGER} |
| | | </delete> |
| | | |
| | | <insert id="insert" keyColumn="id" keyProperty="id" parameterType="staff_management.domain.RyglAddEmployee" useGeneratedKeys="true"> |
| | | <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.ruoyi.staff_management.domain.RyglAddEmployee" useGeneratedKeys="true"> |
| | | insert into rygl_add_employee |
| | | ( id,status,employee_number |
| | | ,name,sex,native_place |
| | |
| | | ,#{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 id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.ruoyi.staff_management.domain.RyglAddEmployee" useGeneratedKeys="true"> |
| | | insert into rygl_add_employee |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">id,</if> |
| | |
| | | <if test="contractEndDate != null">#{contractEndDate,jdbcType=TIMESTAMP},</if> |
| | | </trim> |
| | | </insert> |
| | | <update id="updateByPrimaryKeySelective" parameterType="staff_management.domain.RyglAddEmployee"> |
| | | <update id="updateByPrimaryKeySelective" parameterType="com.ruoyi.staff_management.domain.RyglAddEmployee"> |
| | | update rygl_add_employee |
| | | <set> |
| | | <if test="status != null"> |
| | |
| | | </set> |
| | | where id = #{id,jdbcType=INTEGER} |
| | | </update> |
| | | <update id="updateByPrimaryKey" parameterType="staff_management.domain.RyglAddEmployee"> |
| | | <update id="updateByPrimaryKey" parameterType="com.ruoyi.staff_management.domain.RyglAddEmployee"> |
| | | update rygl_add_employee |
| | | set |
| | | status = #{status,jdbcType=INTEGER}, |