作者 王勇

场站管理、卡口管理、仓库管理基本完善,提交代码

@@ -2,9 +2,11 @@ package com.sunyo.wlpt.station.manage.domain; @@ -2,9 +2,11 @@ package com.sunyo.wlpt.station.manage.domain;
2 2
3 import io.swagger.annotations.ApiModel; 3 import io.swagger.annotations.ApiModel;
4 import io.swagger.annotations.ApiModelProperty; 4 import io.swagger.annotations.ApiModelProperty;
  5 +
5 import java.io.Serializable; 6 import java.io.Serializable;
6 import java.math.BigDecimal; 7 import java.math.BigDecimal;
7 import java.util.Date; 8 import java.util.Date;
  9 +
8 import lombok.AllArgsConstructor; 10 import lombok.AllArgsConstructor;
9 import lombok.Builder; 11 import lombok.Builder;
10 import lombok.Data; 12 import lombok.Data;
@@ -12,8 +14,8 @@ import lombok.NoArgsConstructor; @@ -12,8 +14,8 @@ import lombok.NoArgsConstructor;
12 14
13 /** 15 /**
14 * @author 子诚 16 * @author 子诚
15 - * Description:  
16 - * 时间:2020/10/13 10:39 17 + * Description:仓库静态资源表
  18 + * 时间:2020/10/13 11:59
17 */ 19 */
18 @ApiModel(value = "仓库静态资源表") 20 @ApiModel(value = "仓库静态资源表")
19 @Data 21 @Data
@@ -22,7 +24,8 @@ import lombok.NoArgsConstructor; @@ -22,7 +24,8 @@ import lombok.NoArgsConstructor;
22 @NoArgsConstructor 24 @NoArgsConstructor
23 public class Warehouse implements Serializable { 25 public class Warehouse implements Serializable {
24 26
25 - private static final long serialVersionUID = 1224656100260220596L; 27 + private static final long serialVersionUID = 6900679815589018981L;
  28 +
26 /** 29 /**
27 * ID 30 * ID
28 */ 31 */
@@ -48,7 +51,7 @@ public class Warehouse implements Serializable { @@ -48,7 +51,7 @@ public class Warehouse implements Serializable {
48 private String name; 51 private String name;
49 52
50 /** 53 /**
51 - * 仓库类型:001:进港仓库;002:出港仓库;003:监管仓库;004:危险品仓库 54 + * 仓库类型:001:进港仓库;002:出港仓库;003:查验仓库;004:危险品仓库
52 */ 55 */
53 @ApiModelProperty(value = "仓库类型:001:进港仓库;002:出港仓库;003:查验仓库;004:危险品仓库") 56 @ApiModelProperty(value = "仓库类型:001:进港仓库;002:出港仓库;003:查验仓库;004:危险品仓库")
54 private String warehouseType; 57 private String warehouseType;
@@ -66,12 +69,24 @@ public class Warehouse implements Serializable { @@ -66,12 +69,24 @@ public class Warehouse implements Serializable {
66 private BigDecimal warehouseWidth; 69 private BigDecimal warehouseWidth;
67 70
68 /** 71 /**
  72 + * 仓库高度
  73 + */
  74 + @ApiModelProperty(value = "仓库高度")
  75 + private BigDecimal warehouseHeight;
  76 +
  77 + /**
69 * 仓库面积 78 * 仓库面积
70 */ 79 */
71 @ApiModelProperty(value = "仓库面积") 80 @ApiModelProperty(value = "仓库面积")
72 private BigDecimal warehouseArea; 81 private BigDecimal warehouseArea;
73 82
74 /** 83 /**
  84 + * 仓库体积
  85 + */
  86 + @ApiModelProperty(value = "仓库体积")
  87 + private BigDecimal warehouseVolume;
  88 +
  89 + /**
75 * 创建者 90 * 创建者
76 */ 91 */
77 @ApiModelProperty(value = "创建者") 92 @ApiModelProperty(value = "创建者")
@@ -6,7 +6,7 @@ import org.apache.ibatis.annotations.Mapper;import java.util.List; @@ -6,7 +6,7 @@ import org.apache.ibatis.annotations.Mapper;import java.util.List;
6 /** 6 /**
7 * @author 子诚 7 * @author 子诚
8 * Description: 8 * Description:
9 - * 时间:2020/10/13 10:39 9 + * 时间:2020/10/13 11:59
10 */ 10 */
11 @Mapper 11 @Mapper
12 public interface WarehouseMapper { 12 public interface WarehouseMapper {
@@ -69,3 +69,4 @@ public interface WarehouseService { @@ -69,3 +69,4 @@ public interface WarehouseService {
69 ResultJson selectListByPage(Warehouse warehouse, Integer pageNum, Integer pageSize); 69 ResultJson selectListByPage(Warehouse warehouse, Integer pageNum, Integer pageSize);
70 } 70 }
71 71
  72 +
@@ -66,7 +66,6 @@ public class WarehouseServiceImpl implements WarehouseService { @@ -66,7 +66,6 @@ public class WarehouseServiceImpl implements WarehouseService {
66 return ResultJson.error("400", "仓库长度与仓库宽度,不能为空!"); 66 return ResultJson.error("400", "仓库长度与仓库宽度,不能为空!");
67 } 67 }
68 68
69 - warehouse.setWarehouseArea(BigDecimalUtil.mul(warehouseLength, warehouseWidth));  
70 return warehouseMapper.insertSelective(warehouse) > 0 69 return warehouseMapper.insertSelective(warehouse) > 0
71 ? ResultJson.success("200", "增加仓库信息,成功") 70 ? ResultJson.success("200", "增加仓库信息,成功")
72 : ResultJson.error("500", "增加仓库信息,失败"); 71 : ResultJson.error("500", "增加仓库信息,失败");
@@ -118,3 +117,4 @@ public class WarehouseServiceImpl implements WarehouseService { @@ -118,3 +117,4 @@ public class WarehouseServiceImpl implements WarehouseService {
118 } 117 }
119 } 118 }
120 119
  120 +
@@ -11,7 +11,9 @@ @@ -11,7 +11,9 @@
11 <result column="warehouse_type" jdbcType="VARCHAR" property="warehouseType"/> 11 <result column="warehouse_type" jdbcType="VARCHAR" property="warehouseType"/>
12 <result column="warehouse_length" jdbcType="DECIMAL" property="warehouseLength"/> 12 <result column="warehouse_length" jdbcType="DECIMAL" property="warehouseLength"/>
13 <result column="warehouse_width" jdbcType="DECIMAL" property="warehouseWidth"/> 13 <result column="warehouse_width" jdbcType="DECIMAL" property="warehouseWidth"/>
  14 + <result column="warehouse_height" jdbcType="DECIMAL" property="warehouseHeight"/>
14 <result column="warehouse_area" jdbcType="DECIMAL" property="warehouseArea"/> 15 <result column="warehouse_area" jdbcType="DECIMAL" property="warehouseArea"/>
  16 + <result column="warehouse_volume" jdbcType="DECIMAL" property="warehouseVolume"/>
15 <result column="create_by" jdbcType="VARCHAR" property="createBy"/> 17 <result column="create_by" jdbcType="VARCHAR" property="createBy"/>
16 <result column="create_date" jdbcType="TIMESTAMP" property="createDate"/> 18 <result column="create_date" jdbcType="TIMESTAMP" property="createDate"/>
17 <result column="update_by" jdbcType="VARCHAR" property="updateBy"/> 19 <result column="update_by" jdbcType="VARCHAR" property="updateBy"/>
@@ -21,8 +23,9 @@ @@ -21,8 +23,9 @@
21 </resultMap> 23 </resultMap>
22 <sql id="Base_Column_List"> 24 <sql id="Base_Column_List">
23 <!--@mbg.generated--> 25 <!--@mbg.generated-->
24 - id, yard_id, cop_code, `name`, warehouse_type, warehouse_length, warehouse_width, warehouse_area,  
25 - create_by, create_date, update_by, update_date, remarks, del_flag 26 + id, yard_id, cop_code, `name`, warehouse_type, warehouse_length, warehouse_width,
  27 + warehouse_height, warehouse_area, warehouse_volume, create_by, create_date, update_by,
  28 + update_date, remarks, del_flag
26 </sql> 29 </sql>
27 <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap"> 30 <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
28 <!--@mbg.generated--> 31 <!--@mbg.generated-->
@@ -41,14 +44,16 @@ @@ -41,14 +44,16 @@
41 <!--@mbg.generated--> 44 <!--@mbg.generated-->
42 insert into warehouse (id, yard_id, cop_code, 45 insert into warehouse (id, yard_id, cop_code,
43 `name`, warehouse_type, warehouse_length, 46 `name`, warehouse_type, warehouse_length,
44 - warehouse_width, warehouse_area, create_by,  
45 - create_date, update_by, update_date,  
46 - remarks, del_flag) 47 + warehouse_width, warehouse_height, warehouse_area,
  48 + warehouse_volume, create_by, create_date,
  49 + update_by, update_date, remarks,
  50 + del_flag)
47 values (#{id,jdbcType=VARCHAR}, #{yardId,jdbcType=VARCHAR}, #{copCode,jdbcType=VARCHAR}, 51 values (#{id,jdbcType=VARCHAR}, #{yardId,jdbcType=VARCHAR}, #{copCode,jdbcType=VARCHAR},
48 #{name,jdbcType=VARCHAR}, #{warehouseType,jdbcType=VARCHAR}, #{warehouseLength,jdbcType=DECIMAL}, 52 #{name,jdbcType=VARCHAR}, #{warehouseType,jdbcType=VARCHAR}, #{warehouseLength,jdbcType=DECIMAL},
49 - #{warehouseWidth,jdbcType=DECIMAL}, #{warehouseArea,jdbcType=DECIMAL}, #{createBy,jdbcType=VARCHAR},  
50 - #{createDate,jdbcType=TIMESTAMP}, #{updateBy,jdbcType=VARCHAR}, #{updateDate,jdbcType=TIMESTAMP},  
51 - #{remarks,jdbcType=VARCHAR}, #{delFlag,jdbcType=CHAR}) 53 + #{warehouseWidth,jdbcType=DECIMAL}, #{warehouseHeight,jdbcType=DECIMAL}, #{warehouseArea,jdbcType=DECIMAL},
  54 + #{warehouseVolume,jdbcType=DECIMAL}, #{createBy,jdbcType=VARCHAR}, #{createDate,jdbcType=TIMESTAMP},
  55 + #{updateBy,jdbcType=VARCHAR}, #{updateDate,jdbcType=TIMESTAMP}, #{remarks,jdbcType=VARCHAR},
  56 + #{delFlag,jdbcType=CHAR})
52 </insert> 57 </insert>
53 <insert id="insertSelective" parameterType="com.sunyo.wlpt.station.manage.domain.Warehouse"> 58 <insert id="insertSelective" parameterType="com.sunyo.wlpt.station.manage.domain.Warehouse">
54 <!--@mbg.generated--> 59 <!--@mbg.generated-->
@@ -75,9 +80,15 @@ @@ -75,9 +80,15 @@
75 <if test="warehouseWidth != null"> 80 <if test="warehouseWidth != null">
76 warehouse_width, 81 warehouse_width,
77 </if> 82 </if>
  83 + <if test="warehouseHeight != null">
  84 + warehouse_height,
  85 + </if>
78 <if test="warehouseArea != null"> 86 <if test="warehouseArea != null">
79 warehouse_area, 87 warehouse_area,
80 </if> 88 </if>
  89 + <if test="warehouseVolume != null">
  90 + warehouse_volume,
  91 + </if>
81 <if test="createBy != null"> 92 <if test="createBy != null">
82 create_by, 93 create_by,
83 </if> 94 </if>
@@ -119,9 +130,15 @@ @@ -119,9 +130,15 @@
119 <if test="warehouseWidth != null"> 130 <if test="warehouseWidth != null">
120 #{warehouseWidth,jdbcType=DECIMAL}, 131 #{warehouseWidth,jdbcType=DECIMAL},
121 </if> 132 </if>
  133 + <if test="warehouseHeight != null">
  134 + #{warehouseHeight,jdbcType=DECIMAL},
  135 + </if>
122 <if test="warehouseArea != null"> 136 <if test="warehouseArea != null">
123 #{warehouseArea,jdbcType=DECIMAL}, 137 #{warehouseArea,jdbcType=DECIMAL},
124 </if> 138 </if>
  139 + <if test="warehouseVolume != null">
  140 + #{warehouseVolume,jdbcType=DECIMAL},
  141 + </if>
125 <if test="createBy != null"> 142 <if test="createBy != null">
126 #{createBy,jdbcType=VARCHAR}, 143 #{createBy,jdbcType=VARCHAR},
127 </if> 144 </if>
@@ -164,9 +181,15 @@ @@ -164,9 +181,15 @@
164 <if test="warehouseWidth != null"> 181 <if test="warehouseWidth != null">
165 warehouse_width = #{warehouseWidth,jdbcType=DECIMAL}, 182 warehouse_width = #{warehouseWidth,jdbcType=DECIMAL},
166 </if> 183 </if>
  184 + <if test="warehouseHeight != null">
  185 + warehouse_height = #{warehouseHeight,jdbcType=DECIMAL},
  186 + </if>
167 <if test="warehouseArea != null"> 187 <if test="warehouseArea != null">
168 warehouse_area = #{warehouseArea,jdbcType=DECIMAL}, 188 warehouse_area = #{warehouseArea,jdbcType=DECIMAL},
169 </if> 189 </if>
  190 + <if test="warehouseVolume != null">
  191 + warehouse_volume = #{warehouseVolume,jdbcType=DECIMAL},
  192 + </if>
170 <if test="createBy != null"> 193 <if test="createBy != null">
171 create_by = #{createBy,jdbcType=VARCHAR}, 194 create_by = #{createBy,jdbcType=VARCHAR},
172 </if> 195 </if>
@@ -197,7 +220,9 @@ @@ -197,7 +220,9 @@
197 warehouse_type = #{warehouseType,jdbcType=VARCHAR}, 220 warehouse_type = #{warehouseType,jdbcType=VARCHAR},
198 warehouse_length = #{warehouseLength,jdbcType=DECIMAL}, 221 warehouse_length = #{warehouseLength,jdbcType=DECIMAL},
199 warehouse_width = #{warehouseWidth,jdbcType=DECIMAL}, 222 warehouse_width = #{warehouseWidth,jdbcType=DECIMAL},
  223 + warehouse_height = #{warehouseHeight,jdbcType=DECIMAL},
200 warehouse_area = #{warehouseArea,jdbcType=DECIMAL}, 224 warehouse_area = #{warehouseArea,jdbcType=DECIMAL},
  225 + warehouse_volume = #{warehouseVolume,jdbcType=DECIMAL},
201 create_by = #{createBy,jdbcType=VARCHAR}, 226 create_by = #{createBy,jdbcType=VARCHAR},
202 create_date = #{createDate,jdbcType=TIMESTAMP}, 227 create_date = #{createDate,jdbcType=TIMESTAMP},
203 update_by = #{updateBy,jdbcType=VARCHAR}, 228 update_by = #{updateBy,jdbcType=VARCHAR},
@@ -224,7 +249,9 @@ @@ -224,7 +249,9 @@
224 w.warehouse_type, 249 w.warehouse_type,
225 w.warehouse_length, 250 w.warehouse_length,
226 w.warehouse_width, 251 w.warehouse_width,
  252 + w.warehouse_height,
227 w.warehouse_area, 253 w.warehouse_area,
  254 + w.warehouse_volume,
228 w.create_by, 255 w.create_by,
229 w.create_date, 256 w.create_date,
230 w.update_by, 257 w.update_by,