Browse Source

问题修改

zhs 2 years ago
parent
commit
771e95243d

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

@@ -115,4 +115,8 @@ public class Dictionary  implements Serializable {
      * 仓库类型
      */
     private String warehouseType;
+    /**
+     * 字典名字或code查询
+     */
+    private String nameOrCode;
 }

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

@@ -108,6 +108,10 @@ public class Inventory implements Serializable {
      * 其他入库数量
      */
     private String num;
+    /**
+     * 公司名称
+     */
+    private String accountName;
     /**
      * 页数
      */

+ 32 - 27
src/main/resources/mapper/AskGoodsMapper.xml

@@ -641,46 +641,51 @@
     <!-- 其他入库查询库存是否存在 -->
     <select id="getInventoryInfoOther" resultType="com.tld.model.Inventory">
         select
-            id,
-            storage_location_code,
-            wllb_class,
-            library_type,
-            material_id,
-            amount,
-            total,
-            totime,
-            hold,
-            amount_lock,
-            account_sleeve,
-            wbs,
-            supplier_id,
-            serial,
-            wllb_code,
-            produc_date,
-            scrq,
-            produc_batch,
-            attribute
-        from tld_inventory where material_id = #{materialId}
+            a.id,
+            a.storage_location_code,
+            a.wllb_class,
+            a.library_type,
+            a.material_id,
+            a.amount,
+            a.total,
+            a.totime,
+            a.hold,
+            a.amount_lock,
+            a.account_sleeve,
+            a.wbs,
+            a.supplier_id,
+            a.serial,
+            a.wllb_code,
+            a.produc_date,
+            a.scrq,
+            a.produc_batch,
+            a.attribute,
+            b.name as accountName,
+            c.storage_location_name as storageLocationName
+        from tld_inventory a
+        left join tld_company b on a.account_sleeve = b.code
+        left join tld_storage_location c on a.storage_location_code = c.storage_location_code
+        where material_id = #{materialId}
         <if test="wbs != '' and wbs != null">
-            and wbs = #{wbs}
+            and a.wbs = #{wbs}
         </if>
         <if test="serial != '' and serial != null">
-            and serial = #{serial}
+            and a.serial = #{serial}
         </if>
         <if test="attribute != '' and attribute != null">
-            and attribute = #{attribute}
+            and a.attribute = #{attribute}
         </if>
         <if test="producDate != '' and producDate != null">
-            and produc_batch = #{producDate}
+            and a.produc_batch = #{producDate}
         </if>
         <if test="supplierId != '' and supplierId != null">
-            and supplier_id = #{supplierId}
+            and a.supplier_id = #{supplierId}
         </if>
         <if test="storageLocationCode != '' and storageLocationCode != null">
-            and storage_location_code = #{storageLocationCode}
+            and a.storage_location_code = #{storageLocationCode}
         </if>
         <if test="accountSleeve != '' and accountSleeve != null">
-            and account_sleeve = #{accountSleeve}
+            and a.account_sleeve = #{accountSleeve}
         </if>
     </select>
     <!-- 查询仓库 -->

+ 19 - 10
src/main/resources/mapper/DictionaryMapper.xml

@@ -36,6 +36,9 @@
             <if test="id != null and id != ''">
                 and id = #{id}
             </if>
+            <if test="nameOrCode != null and nameOrCode != ''">
+                and code like CONCAT(CONCAT('%', #{nameOrCode}), '%') or name like CONCAT(CONCAT('%', #{nameOrCode}), '%')
+            </if>
         </trim>
     </select>
     <!-- 查询字典内容分页 -->
@@ -68,6 +71,9 @@
             <if test="typeVal != null and typeVal != ''">
                 and type = #{typeVal}
             </if>
+            <if test="nameOrCode != null and nameOrCode != ''">
+                and code like CONCAT(CONCAT('%', #{code}), '%') or name like CONCAT(CONCAT('%', #{name}), '%')
+            </if>
         </trim>
         order by id desc
     </select>
@@ -125,15 +131,15 @@
     <!--物料字典导出-->
     <select id="export" resultType="java.util.LinkedHashMap">
         select
-        code,
-        name,
-        if(part_type = '', null , part_type),
-        if(wllb_class = '', null , wllb_class),
-        if(size = '', null , size),
-        if(max_num = '', null , max_num),
-        if(min_num = '', null , min_num),
-        if(is_not_disable = '1', '是' , '否'),
-        if(is_recommend = '1', '是' , '否' )
+            code,
+            name,
+            if(part_type = '', null , part_type),
+            if(wllb_class = '', null , wllb_class),
+            if(size = '', null , size),
+            if(max_num = '', null , max_num),
+            if(min_num = '', null , min_num),
+            if(is_not_disable = '1', '是' , '否'),
+            if(is_recommend = '1', '是' , '否' )
         from tld_material
         <trim prefix="WHERE" prefixOverrides="and |or">
             <if test="name != null and name != ''">
@@ -160,7 +166,7 @@
         </trim>
         order by id desc
     </select>
-    <!--查询物料字典内容分页-->
+    <!-- 查询物料字典内容分页 -->
     <select id="getDictionaryPageMaterial" resultType="com.tld.model.Dictionary">
         select
         a.*,
@@ -192,6 +198,9 @@
             <if test="typeVal != null and typeVal != ''">
                 and a.type = #{typeVal}
             </if>
+            <if test="nameOrCode != null and nameOrCode != ''">
+                and code like CONCAT(CONCAT('%', #{nameOrCode}), '%') or name like CONCAT(CONCAT('%', #{nameOrCode}), '%')
+            </if>
         </trim>
         order by a.id desc
     </select>

+ 10 - 8
src/main/resources/mapper/QueryListMappeer.xml

@@ -5,14 +5,15 @@
     <!-- 呆滞品查询 -->
    <select id="dullGoods" resultType="java.util.Map">
        SELECT
-           a.id as id,
-           a.material_id as materialId,
-           a.amount as amount,
-           a.scrq as scrq,
-           a.storage_location_code as storageLocationCode,
-           b.name as materialName,
-           c.storage_location_name as storageLocationName,
-           b.code as wllbCode
+            a.id as id,
+            a.material_id as materialId,
+            a.amount as amount,
+            a.scrq as scrq,
+            a.storage_location_code as storageLocationCode,
+            b.name as materialName,
+            c.storage_location_name as storageLocationName,
+            b.code as wllbCode,
+            a.wbs as wbs
        FROM tld_inventory a
        JOIN tld_material b ON a.material_id = b.tld_id
        LEFT JOIN  tld_storage_location c ON a.storage_location_code = c.storage_location_code
@@ -57,6 +58,7 @@
             a.material_id as materialId,
             sum( a.amount ) AS sum,
             a.serial,
+            a.wbs as wbs,
             a.produc_batch as producBatch,
             a.supplier_id as supplierId,
             b.storage_location_name as storageLocationName ,

+ 12 - 11
src/main/resources/mapper/ReceiveGoodsMapper.xml

@@ -5,17 +5,18 @@
     <!-- 查询收货单 -->
     <select id="getReceiveGoods" resultType="com.tld.model.ReceiveGoods">
         select
-        a.id,
-        a.order_code,
-        b.name as materialName,
-        c.name as supplierName,
-        a.purchase_num,
-        a.arrival_num,
-        a.type,
-        a.qualified_num,
-        a.disqualification_num,
-        a.arrival_time,
-        c.code as wllbCode
+            a.id,
+            a.order_code,
+            b.name as materialName,
+            c.name as supplierName,
+            a.purchase_num,
+            a.arrival_num,
+            a.type,
+            a.qualified_num,
+            a.disqualification_num,
+            a.arrival_time,
+            c.code as wllbCode,
+            a.wbs
         from tld_receive_goods a
         left join tld_material b on a.material_id = b.tld_id
         left join tld_customer c on a.supplier_id = c.code