1.添加库存养护功能代码

wms_pzh
x_z 3 years ago
parent 1a67d39d9a
commit 2590935346

@ -0,0 +1,18 @@
package com.glxp.api.admin.dao.inventory;
import com.glxp.api.admin.entity.inventory.InvMaintenanceOrderEntity;
public interface InvMaintenanceOrderDao {
int deleteByPrimaryKey(Integer id);
int insert(InvMaintenanceOrderEntity record);
int insertSelective(InvMaintenanceOrderEntity record);
InvMaintenanceOrderEntity selectByPrimaryKey(Integer id);
int updateByPrimaryKeySelective(InvMaintenanceOrderEntity record);
int updateByPrimaryKey(InvMaintenanceOrderEntity record);
}

@ -0,0 +1,18 @@
package com.glxp.api.admin.dao.inventory;
import com.glxp.api.admin.entity.inventory.InvMaintenanceOrderDetailEntity;
public interface InvMaintenanceOrderDetailDao {
int deleteByPrimaryKey(Integer id);
int insert(InvMaintenanceOrderDetailEntity record);
int insertSelective(InvMaintenanceOrderDetailEntity record);
InvMaintenanceOrderDetailEntity selectByPrimaryKey(Integer id);
int updateByPrimaryKeySelective(InvMaintenanceOrderDetailEntity record);
int updateByPrimaryKey(InvMaintenanceOrderDetailEntity record);
}

@ -0,0 +1,67 @@
package com.glxp.api.admin.entity.inventory;
import lombok.Data;
/**
*
*/
@Data
public class InvMaintenanceOrderDetailEntity {
private Integer id;
/**
*
*/
private String orderIdFk;
/**
*
*/
private String code;
/**
* ID
*/
private String productId;
/**
* DI
*/
private String nameCode;
/**
*
*/
private String batchNo;
/**
*
*/
private String produceDate;
/**
*
*/
private String expireDate;
/**
*
*/
private Integer count;
/**
*
*/
private Boolean maintenanceStatus;
/**
*
*/
private Boolean deviceStatus;
/**
*
*/
private String remark;
}

@ -0,0 +1,62 @@
package com.glxp.api.admin.entity.inventory;
import lombok.Data;
/**
*
*/
@Data
public class InvMaintenanceOrderEntity {
private Integer id;
/**
*
*/
private String orderId;
/**
*
*/
private String invWarehouseCode;
/**
*
*/
private String invSpaceCode;
/**
* 0稿 1 2
*/
private Boolean status;
/**
*
*/
private String createTime;
/**
*
*/
private String updateTime;
/**
*
*/
private String auditTime;
/**
*
*/
private String createUser;
/**
*
*/
private String auditUser;
/**
*
*/
private String remark;
}

@ -0,0 +1,179 @@
<?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.glxp.api.admin.dao.inventory.InvMaintenanceOrderDao">
<resultMap id="BaseResultMap" type="com.glxp.api.admin.entity.inventory.InvMaintenanceOrderEntity">
<id column="id" jdbcType="INTEGER" property="id"/>
<result column="orderId" jdbcType="VARCHAR" property="orderId"/>
<result column="invWarehouseCode" jdbcType="VARCHAR" property="invWarehouseCode"/>
<result column="invSpaceCode" jdbcType="VARCHAR" property="invSpaceCode"/>
<result column="status" jdbcType="BOOLEAN" property="status"/>
<result column="createTime" jdbcType="VARCHAR" property="createTime"/>
<result column="updateTime" jdbcType="VARCHAR" property="updateTime"/>
<result column="auditTime" jdbcType="VARCHAR" property="auditTime"/>
<result column="createUser" jdbcType="VARCHAR" property="createUser"/>
<result column="auditUser" jdbcType="VARCHAR" property="auditUser"/>
<result column="remark" jdbcType="VARCHAR" property="remark"/>
</resultMap>
<sql id="Base_Column_List">
id,
orderId,
invWarehouseCode,
invSpaceCode,
`status`,
createTime,
updateTime,
auditTime,
`createUser`,
auditUser,
remark
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from inv_maintenance_order
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete
from inv_maintenance_order
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" keyColumn="id" keyProperty="id"
parameterType="com.glxp.api.admin.entity.inventory.InvMaintenanceOrderEntity" useGeneratedKeys="true">
insert into inv_maintenance_order (orderId, invWarehouseCode, invSpaceCode,
`status`, createTime, updateTime,
auditTime, `createUser`, auditUser,
remark)
values (#{orderId,jdbcType=VARCHAR}, #{invWarehouseCode,jdbcType=VARCHAR}, #{invSpaceCode,jdbcType=VARCHAR},
#{status,jdbcType=BOOLEAN}, #{createTime,jdbcType=VARCHAR}, #{updateTime,jdbcType=VARCHAR},
#{auditTime,jdbcType=VARCHAR}, #{createUser,jdbcType=VARCHAR}, #{auditUser,jdbcType=VARCHAR},
#{remark,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" keyColumn="id" keyProperty="id"
parameterType="com.glxp.api.admin.entity.inventory.InvMaintenanceOrderEntity" useGeneratedKeys="true">
insert into inv_maintenance_order
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="orderId != null">
orderId,
</if>
<if test="invWarehouseCode != null">
invWarehouseCode,
</if>
<if test="invSpaceCode != null">
invSpaceCode,
</if>
<if test="status != null">
`status`,
</if>
<if test="createTime != null">
createTime,
</if>
<if test="updateTime != null">
updateTime,
</if>
<if test="auditTime != null">
auditTime,
</if>
<if test="createUser != null">
`createUser`,
</if>
<if test="auditUser != null">
auditUser,
</if>
<if test="remark != null">
remark,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="orderId != null">
#{orderId,jdbcType=VARCHAR},
</if>
<if test="invWarehouseCode != null">
#{invWarehouseCode,jdbcType=VARCHAR},
</if>
<if test="invSpaceCode != null">
#{invSpaceCode,jdbcType=VARCHAR},
</if>
<if test="status != null">
#{status,jdbcType=BOOLEAN},
</if>
<if test="createTime != null">
#{createTime,jdbcType=VARCHAR},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=VARCHAR},
</if>
<if test="auditTime != null">
#{auditTime,jdbcType=VARCHAR},
</if>
<if test="createUser != null">
#{createUser,jdbcType=VARCHAR},
</if>
<if test="auditUser != null">
#{auditUser,jdbcType=VARCHAR},
</if>
<if test="remark != null">
#{remark,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective"
parameterType="com.glxp.api.admin.entity.inventory.InvMaintenanceOrderEntity">
update inv_maintenance_order
<set>
<if test="orderId != null">
orderId = #{orderId,jdbcType=VARCHAR},
</if>
<if test="invWarehouseCode != null">
invWarehouseCode = #{invWarehouseCode,jdbcType=VARCHAR},
</if>
<if test="invSpaceCode != null">
invSpaceCode = #{invSpaceCode,jdbcType=VARCHAR},
</if>
<if test="status != null">
`status` = #{status,jdbcType=BOOLEAN},
</if>
<if test="createTime != null">
createTime = #{createTime,jdbcType=VARCHAR},
</if>
<if test="updateTime != null">
updateTime = #{updateTime,jdbcType=VARCHAR},
</if>
<if test="auditTime != null">
auditTime = #{auditTime,jdbcType=VARCHAR},
</if>
<if test="createUser != null">
`createUser` = #{createUser,jdbcType=VARCHAR},
</if>
<if test="auditUser != null">
auditUser = #{auditUser,jdbcType=VARCHAR},
</if>
<if test="remark != null">
remark = #{remark,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.glxp.api.admin.entity.inventory.InvMaintenanceOrderEntity">
update inv_maintenance_order
set orderId = #{orderId,jdbcType=VARCHAR},
invWarehouseCode = #{invWarehouseCode,jdbcType=VARCHAR},
invSpaceCode = #{invSpaceCode,jdbcType=VARCHAR},
`status` = #{status,jdbcType=BOOLEAN},
createTime = #{createTime,jdbcType=VARCHAR},
updateTime = #{updateTime,jdbcType=VARCHAR},
auditTime = #{auditTime,jdbcType=VARCHAR},
`createUser` = #{createUser,jdbcType=VARCHAR},
auditUser = #{auditUser,jdbcType=VARCHAR},
remark = #{remark,jdbcType=VARCHAR}
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>

@ -0,0 +1,190 @@
<?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.glxp.api.admin.dao.inventory.InvMaintenanceOrderDetailDao">
<resultMap id="BaseResultMap" type="com.glxp.api.admin.entity.inventory.InvMaintenanceOrderDetailEntity">
<id column="id" jdbcType="INTEGER" property="id"/>
<result column="orderIdFk" jdbcType="VARCHAR" property="orderIdFk"/>
<result column="code" jdbcType="VARCHAR" property="code"/>
<result column="productId" jdbcType="VARCHAR" property="productId"/>
<result column="nameCode" jdbcType="VARCHAR" property="nameCode"/>
<result column="batchNo" jdbcType="VARCHAR" property="batchNo"/>
<result column="produceDate" jdbcType="VARCHAR" property="produceDate"/>
<result column="expireDate" jdbcType="VARCHAR" property="expireDate"/>
<result column="count" jdbcType="INTEGER" property="count"/>
<result column="maintenanceStatus" jdbcType="BOOLEAN" property="maintenanceStatus"/>
<result column="deviceStatus" jdbcType="BOOLEAN" property="deviceStatus"/>
<result column="remark" jdbcType="VARCHAR" property="remark"/>
</resultMap>
<sql id="Base_Column_List">
id,
orderIdFk,
code,
productId,
nameCode,
batchNo,
produceDate,
expireDate,
`count`,
maintenanceStatus,
deviceStatus,
remark
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from inv_maintenance_order_detail
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete
from inv_maintenance_order_detail
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" keyColumn="id" keyProperty="id"
parameterType="com.glxp.api.admin.entity.inventory.InvMaintenanceOrderDetailEntity" useGeneratedKeys="true">
insert into inv_maintenance_order_detail (orderIdFk, code, productId,
nameCode, batchNo, produceDate,
expireDate, `count`, maintenanceStatus,
deviceStatus, remark)
values (#{orderIdFk,jdbcType=VARCHAR}, #{code,jdbcType=VARCHAR}, #{productId,jdbcType=VARCHAR},
#{nameCode,jdbcType=VARCHAR}, #{batchNo,jdbcType=VARCHAR}, #{produceDate,jdbcType=VARCHAR},
#{expireDate,jdbcType=VARCHAR}, #{count,jdbcType=INTEGER}, #{maintenanceStatus,jdbcType=BOOLEAN},
#{deviceStatus,jdbcType=BOOLEAN}, #{remark,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" keyColumn="id" keyProperty="id"
parameterType="com.glxp.api.admin.entity.inventory.InvMaintenanceOrderDetailEntity" useGeneratedKeys="true">
insert into inv_maintenance_order_detail
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="orderIdFk != null">
orderIdFk,
</if>
<if test="code != null">
code,
</if>
<if test="productId != null">
productId,
</if>
<if test="nameCode != null">
nameCode,
</if>
<if test="batchNo != null">
batchNo,
</if>
<if test="produceDate != null">
produceDate,
</if>
<if test="expireDate != null">
expireDate,
</if>
<if test="count != null">
`count`,
</if>
<if test="maintenanceStatus != null">
maintenanceStatus,
</if>
<if test="deviceStatus != null">
deviceStatus,
</if>
<if test="remark != null">
remark,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="orderIdFk != null">
#{orderIdFk,jdbcType=VARCHAR},
</if>
<if test="code != null">
#{code,jdbcType=VARCHAR},
</if>
<if test="productId != null">
#{productId,jdbcType=VARCHAR},
</if>
<if test="nameCode != null">
#{nameCode,jdbcType=VARCHAR},
</if>
<if test="batchNo != null">
#{batchNo,jdbcType=VARCHAR},
</if>
<if test="produceDate != null">
#{produceDate,jdbcType=VARCHAR},
</if>
<if test="expireDate != null">
#{expireDate,jdbcType=VARCHAR},
</if>
<if test="count != null">
#{count,jdbcType=INTEGER},
</if>
<if test="maintenanceStatus != null">
#{maintenanceStatus,jdbcType=BOOLEAN},
</if>
<if test="deviceStatus != null">
#{deviceStatus,jdbcType=BOOLEAN},
</if>
<if test="remark != null">
#{remark,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective"
parameterType="com.glxp.api.admin.entity.inventory.InvMaintenanceOrderDetailEntity">
update inv_maintenance_order_detail
<set>
<if test="orderIdFk != null">
orderIdFk = #{orderIdFk,jdbcType=VARCHAR},
</if>
<if test="code != null">
code = #{code,jdbcType=VARCHAR},
</if>
<if test="productId != null">
productId = #{productId,jdbcType=VARCHAR},
</if>
<if test="nameCode != null">
nameCode = #{nameCode,jdbcType=VARCHAR},
</if>
<if test="batchNo != null">
batchNo = #{batchNo,jdbcType=VARCHAR},
</if>
<if test="produceDate != null">
produceDate = #{produceDate,jdbcType=VARCHAR},
</if>
<if test="expireDate != null">
expireDate = #{expireDate,jdbcType=VARCHAR},
</if>
<if test="count != null">
`count` = #{count,jdbcType=INTEGER},
</if>
<if test="maintenanceStatus != null">
maintenanceStatus = #{maintenanceStatus,jdbcType=BOOLEAN},
</if>
<if test="deviceStatus != null">
deviceStatus = #{deviceStatus,jdbcType=BOOLEAN},
</if>
<if test="remark != null">
remark = #{remark,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.glxp.api.admin.entity.inventory.InvMaintenanceOrderDetailEntity">
update inv_maintenance_order_detail
set orderIdFk = #{orderIdFk,jdbcType=VARCHAR},
code = #{code,jdbcType=VARCHAR},
productId = #{productId,jdbcType=VARCHAR},
nameCode = #{nameCode,jdbcType=VARCHAR},
batchNo = #{batchNo,jdbcType=VARCHAR},
produceDate = #{produceDate,jdbcType=VARCHAR},
expireDate = #{expireDate,jdbcType=VARCHAR},
`count` = #{count,jdbcType=INTEGER},
maintenanceStatus = #{maintenanceStatus,jdbcType=BOOLEAN},
deviceStatus = #{deviceStatus,jdbcType=BOOLEAN},
remark = #{remark,jdbcType=VARCHAR}
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>

@ -0,0 +1,37 @@
DROP TABLE IF EXISTS `inv_maintenance_order`;
CREATE TABLE `inv_maintenance_order` (
`id` int NOT NULL AUTO_INCREMENT,
`orderId` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '养护记录号',
`invWarehouseCode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '分库码',
`invSpaceCode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '货位码',
`status` tinyint(1) NULL DEFAULT NULL COMMENT '状态 0草稿 1未审核 2已完成',
`createTime` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '养护日期',
`updateTime` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '更新时间',
`auditTime` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '审核时间',
`createUser` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '养护人',
`auditUser` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '审核人',
`remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '备注',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '养护记录表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for inv_maintenance_order_detail
-- ----------------------------
DROP TABLE IF EXISTS `inv_maintenance_order_detail`;
CREATE TABLE `inv_maintenance_order_detail` (
`id` int NOT NULL AUTO_INCREMENT COMMENT 'id',
`orderIdFk` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '养护记录号',
`code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '条码',
`productId` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '产品ID',
`nameCode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'DI标识',
`batchNo` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '批次号',
`produceDate` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '生产日期',
`expireDate` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '失效日期',
`count` int NULL DEFAULT NULL COMMENT '养护数量',
`maintenanceStatus` tinyint(1) NULL DEFAULT NULL COMMENT '养护状态',
`deviceStatus` tinyint(1) NULL DEFAULT NULL COMMENT '设备状态',
`remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '备注',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '养护单据详情表' ROW_FORMAT = Dynamic;
SET FOREIGN_KEY_CHECKS = 1;
Loading…
Cancel
Save