Bladeren bron

问题修改

xiaochen 2 jaren geleden
bovenliggende
commit
11da5270e9

+ 3 - 3
build.gradle

@@ -35,9 +35,9 @@ dependencies {
     implementation 'com.google.zxing:core:3.5.1'
     implementation 'com.google.zxing:javase:3.5.1'
     implementation 'org.iherus:qrext4j:1.3.1'
-    implementation 'cn.afterturn:easypoi-base:4.4.0'
-    implementation 'cn.afterturn:easypoi-web:4.4.0'
-    implementation 'cn.afterturn:easypoi-annotation:4.4.0'
+//    implementation 'cn.afterturn:easypoi-base:4.4.0'
+//    implementation 'cn.afterturn:easypoi-web:4.4.0'
+//    implementation 'cn.afterturn:easypoi-annotation:4.4.0'
     //excel导入导出
     implementation 'org.apache.poi:poi-ooxml:3.16'
     //接口调用

+ 4 - 0
src/main/java/com/tld/model/Container.java

@@ -32,6 +32,10 @@ public class Container implements Serializable {
      * 容器名称
      */
     private String containerName;
+    /**
+     * 容器code
+     */
+    private String code;
     /**
      * 数量
      */

+ 8 - 0
src/main/java/com/tld/model/StorageLocation.java

@@ -52,6 +52,14 @@ public class StorageLocation implements Serializable {
      * 是否产成品库位
      */
     private String isProduct;
+    /**
+     * 仓库名字
+     */
+    private String wareHouseName;
+    /**
+     * tldId
+     */
+    private String tldId;
     /**
      * 创建时间
      */

+ 1 - 1
src/main/java/com/tld/service/impl/ContainerServiceImpl.java

@@ -108,7 +108,7 @@ public class ContainerServiceImpl implements ContainerService {
             //导出数据汇总
             List<List<Object>> sheetDataList = new ArrayList<>();
             //表头数据
-            List<Object> head = Arrays.asList("部门", "类别", "容器名称","数量","创建时间");
+            List<Object> head = Arrays.asList("部门", "类别", "容器code","容器名称","数量","创建时间");
             //查询数据
             PageHelper.startPage(container.getPage(), container.getLimit());
             PageInfo<Map<String, Object>> list = new PageInfo<>(containerMapper.export(container));

+ 1 - 1
src/main/resources/mapper/AskGoodsMapper.xml

@@ -528,7 +528,7 @@
         <if test="wbs != '' and wbs != null">
             and wbs = #{wbs}
         </if>
-        <if test="wbs = ''">
+        <if test="wbs == ''.toString() or wbs == null ">
             and wbs is null
         </if>
     </select>

+ 7 - 2
src/main/resources/mapper/ContainerMapper.xml

@@ -15,6 +15,7 @@
             a.type,
             a.container_name,
             a.num,
+            a.code,
             a.create_time
         from tld_container a
         left join tld_department b on a.department = b.id
@@ -36,8 +37,8 @@
     </select>
     <!-- 新增容器内容 -->
     <insert id="addContainer">
-        insert into tld_container(department,type,container_name,num,create_time)
-         values(#{department},#{type},#{containerName},#{num},DATE_FORMAT(NOW(), '%Y-%m-%d'))
+        insert into tld_container(department,type,container_name,num,code,create_time)
+         values(#{department},#{type},#{containerName},#{num},#{code},DATE_FORMAT(NOW(), '%Y-%m-%d'))
     </insert>
     <!-- 修改容器内容 -->
     <update id="updateContainer">
@@ -56,6 +57,9 @@
                 <if test="num != null">
                     num = #{num},
                 </if>
+                <if test="code != null">
+                    code = #{code},
+                </if>
             </trim>
         </set>
         where id = #{id}
@@ -69,6 +73,7 @@
         select
             b.name as department,
             a.type,
+            a.code as code,
             a.container_name,
             a.num,
             a.create_time

+ 4 - 1
src/main/resources/mapper/StorageLocationMapper.xml

@@ -18,10 +18,13 @@
             a.storage_location_capacity,
             a.create_time,
             a.is_product,
-            b.name as materialName
+            b.name as materialName,
+            c.name as wareHouseName,
+            c.tld_id as tldId
         from
         tld_storage_location a
         left join tld_material_type b on a.storage_location_type = b.tld_id
+        left join tld_warehouse c on a.warehouse_where = c.tld_id
         <trim prefix="WHERE" prefixOverrides="and |or">
             <if test="storageLocationCode != null and storageLocationCode != ''">
                 and a.storage_location_code like CONCAT(CONCAT('%', #{storageLocationCode}), '%')