xiaochen 2 anni fa
parent
commit
d60226bda7

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

@@ -24,6 +24,10 @@ public class Container implements Serializable {
      * 部门id
      */
     private String departmentId;
+    /**
+     * 部门code
+     */
+    private String departmentCode;
     /**
      * 类别
      */

+ 2 - 2
src/main/java/com/tld/model/Inventory.java

@@ -137,11 +137,11 @@ public class Inventory implements Serializable {
      */
     private String companyName;
     /**
-     * 计量单位   groupBy
+     * 计量单位
      */
     private String unitOfMeasurement;
     /**
-     * 分组   groupBy
+     * 分组
      */
     private String groupBy;
     /**

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

@@ -39,6 +39,10 @@ public class ReceiveGoods implements Serializable {
      * 物料id
      */
     private String materialId;
+    /**
+     * 物料code
+     */
+    private String materialCode;
     /**
      * 计量单位
      */

+ 4 - 3
src/main/java/com/tld/service/impl/AskGoodsServiceImpl.java

@@ -517,7 +517,7 @@ public class AskGoodsServiceImpl implements AskGoodsService {
             //导出数据汇总
             List<List<Object>> sheetDataList = new ArrayList<>();
             //表头数据
-            List<Object> head = Arrays.asList("要货单", "出库编号","物料编号","物料名称", "出库数量", "出库人", "领用部门", "WBS编号", "出库时间","真实姓名");
+            List<Object> head = Arrays.asList("要货单", "出库编号","物料编号","物料名称", "出库数量", "出库人", "领用部门", "WBS编号", "出库时间","真实姓名","所属公司");
             //查询数据
             List<Map<String, Object>> list = askGoodsMapper.getRemovalHalfProductExcel(askGoods);
             sheetDataList.add(head);
@@ -647,7 +647,8 @@ public class AskGoodsServiceImpl implements AskGoodsService {
                         .setDepartment(askGoods.getDepartment())
                         .setWbs(askGoods.getWbs())
                         .setStorageCode(removalCode)
-                        .setStorageLocationCode(askGoods.getStorageLocationCode());//新增出库流水
+                        .setStorageLocationCode(askGoods.getStorageLocationCode())
+                        .setCompanyNumber(askGoods.getAccountSleeve());//新增出库流水
                 warehousingMapper.addRemovalHalfProduct(askGoods1);
             } else if(material.getPartType().equals("产成品")){
                 //产成品销售流水
@@ -656,7 +657,7 @@ public class AskGoodsServiceImpl implements AskGoodsService {
                         .setOutNum(askGoods.getNum()) //出库数量
                         .setUserId(askGoods.getUserId()) //用户id
                         .setDeliveryId("") //销售单id
-                        .setCompanyNumber("") //公司编号
+                        .setCompanyNumber(askGoods.getAccountSleeve()) //公司编号
                         .setCustomerCode("")//客户编号
                         .setWbs(askGoods.getWbs())
                         .setStorageCode(removalCode);

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

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

+ 3 - 3
src/main/java/com/tld/service/impl/QueryListServiceImpl.java

@@ -166,7 +166,7 @@ public class QueryListServiceImpl implements QueryListService {
             //导出数据汇总
             List<List<Object>> sheetDataList = new ArrayList<>();
             //表头数据
-            List<Object> head = Arrays.asList("生产领料单", "物料ID", "要货数量", "已出库数量", "物料名称", "物料编号", "要料单编号", "公司编号");
+            List<Object> head = Arrays.asList("生产领料单", "物料ID", "要货数量", "已出库数量", "物料名称", "物料编号", "要料单编号","WBS编号", "公司编号","公司名称");
             //查询数据
             List<Map<String, Object>> list = queryListMapper.getAskGoodsExcel(askGoods);
             sheetDataList.add(head);
@@ -212,7 +212,7 @@ public class QueryListServiceImpl implements QueryListService {
             //导出数据汇总
             List<List<Object>> sheetDataList = new ArrayList<>();
             //表头数据
-            List<Object> head = Arrays.asList("生产领料单", "物料ID", "要货数量", "已出库数量", "物料名称", "物料编号", "要料单编号", "公司编号");
+            List<Object> head = Arrays.asList("生产领料单", "物料ID", "要货数量", "已出库数量", "物料名称", "物料编号", "要料单编号", "WBS编号" ,"公司编号","公司名称");
             //查询数据
             List<Map<String, Object>> list = queryListMapper.getInviteExcel(askGoods);
             sheetDataList.add(head);
@@ -431,7 +431,7 @@ public class QueryListServiceImpl implements QueryListService {
             //导出数据汇总
             List<List<Object>> sheetDataList = new ArrayList<>();
             //表头数据
-            List<Object> head = Arrays.asList("物料编号", "物料名称", "数量","最小数量","最大数量");
+            List<Object> head = Arrays.asList("物料编号", "物料名称", "数量","最大数量","最小数量");
             //查询数据
             List<Map<String, Object>> list = queryListMapper.reserveWarningsExport(inventory);
             sheetDataList.add(head);

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

@@ -93,7 +93,7 @@ public class RoleServiceImpl implements RoleService {
             //导出数据汇总
             List<List<Object>> sheetDataList = new ArrayList<>();
             //表头数据
-            List<Object> head = Arrays.asList("角色编号", "角色名", "创建时间","备注");
+            List<Object> head = Arrays.asList("角色编号", "角色名","备注");
             //查询数据
             List<Map<String, Object>> list = roleMapper.export(role);
             sheetDataList.add(head);

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

@@ -96,7 +96,7 @@ public class StorageLocationServiceImpl implements StorageLocationService {
             //导出数据汇总
             List<List<Object>> sheetDataList = new ArrayList<>();
             //表头数据
-            List<Object> head = Arrays.asList("库位编号", "库位名称", "所在仓库","库位类型","库位容量","是否混合库位","创建时间");
+            List<Object> head = Arrays.asList("库位编号", "库位名称", "所在仓库","物料类型","是否是混合库位","是否是产成品库位");
             //查询数据
             List<Map<String, Object>> list = storageLocationMapper.export(storageLocation);
             sheetDataList.add(head);

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

@@ -124,7 +124,7 @@ public class UserMaterialServiceImpl implements UserMaterialService {
             //导出数据汇总
             List<List<Object>> sheetDataList = new ArrayList<>();
             //表头数据
-            List<Object> head = Arrays.asList("物料编号", "物料名称", "工号","真实姓名");
+            List<Object> head = Arrays.asList("物料编号", "物料名称", "工号","姓名");
             //查询数据
             List<Map<String, Object>> list = userMaterialMapper.Export(userMaterial);
             sheetDataList.add(head);

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

@@ -162,7 +162,7 @@ public class UserServiceImpl implements UserService {
             //导出数据汇总
             List<List<Object>> sheetDataList = new ArrayList<>();
             //表头数据
-            List<Object> head = Arrays.asList("用户编号", "用户名", "真实姓名","邮箱","电话", "手机", "部门", "角色");
+            List<Object> head = Arrays.asList("用户编号", "工号", "姓名","邮箱", "手机", "部门", "角色名称");
             //查询数据
             List<Map<String, Object>> list = userMapper.getUserExportData(user);
             sheetDataList.add(head);

+ 3 - 3
src/main/java/com/tld/service/impl/WarehousingServiceImpl.java

@@ -328,7 +328,7 @@ public class WarehousingServiceImpl implements WarehousingService {
             //导出数据汇总
             List<List<Object>> sheetDataList = new ArrayList<>();
             //表头数据
-            List<Object> head = Arrays.asList("物料名称", "物料编号", "供应商名称", "连番号", "生产日期", "生产批次", "容量", "序列号", "类型", "用户名称", "部门", "库位名称", "入库日期", "采购单号", "WBS","真实姓名","采购订单号", "公司名称", "采购数量");
+            List<Object> head = Arrays.asList("物料名称", "物料编号", "供应商", "连番号", "生产批次", "入库数量", "类型", "工号", "库位名称", "入库日期", "入库单编号", "WBS编号","姓名","采购订单号", "所属公司", "公司编号" ,"采购数量");
             //查询数据
             List<Map<String, Object>> list = new ArrayList<>(warehousingMapper.export(storage));
             sheetDataList.add(head);
@@ -537,7 +537,7 @@ public class WarehousingServiceImpl implements WarehousingService {
             //导出数据汇总
             List<List<Object>> sheetDataList = new ArrayList<>();
             //表头数据
-            List<Object> head = Arrays.asList("物料名称", "物料编号", "生产时间", "数量", "用户名称", "入库时间", "入库单编号", "WBS","真实姓名","生产订单号","公司名称");
+            List<Object> head = Arrays.asList("物料名称", "物料编号", "生产批次", "入库数量", "工号", "入库时间", "入库编号", "WBS编号","姓名","生产订单号","所属公司","公司编号");
             //查询数据
             List<Map<String, Object>> list = warehousingMapper.productExcel(notice);
             sheetDataList.add(head);
@@ -769,7 +769,7 @@ public class WarehousingServiceImpl implements WarehousingService {
             //导出数据汇总
             List<List<Object>> sheetDataList = new ArrayList<>();
             //表头数据
-            List<Object> head = Arrays.asList("物料名称", "物料编号", "生产批次", "数量", "用户名称", "库位编号", "入库时间", "连番号", "序列号", "属性", "入库单编号", "WBS","真实姓名","生产订单号","公司名称");
+            List<Object> head = Arrays.asList("物料名称", "物料编号", "生产批次", "数量", "工号", "库位名称", "入库时间", "连番号", "属性", "入库单编号", "WBS编号","姓名","生产订单号","所属公司","公司编号");
             //查询数据
             List<Map<String, Object>> list = warehousingMapper.getHalfExcel(notice);
             sheetDataList.add(head);

+ 10 - 5
src/main/resources/mapper/AskGoodsMapper.xml

@@ -460,6 +460,9 @@
             <if test="askGoodsCode != null and askGoodsCode != ''">
                 and p.ask_goods_code like CONCAT(CONCAT('%', #{askGoodsCode}), '%')
             </if>
+            <if test="wbs != null and wbs != ''">
+                and a.wbs like CONCAT(CONCAT('%', #{wbs}), '%')
+            </if>
             <if test="accountSleeve != null and accountSleeve != ''">
                 and a.account_sleeve = #{accountSleeve}
             </if>
@@ -480,7 +483,6 @@
             a.num,
             p.ask_goods_code,
             c.real_name,
-            a.account_sleeve,
             f.name as accountName
         from tld_removal a
         left join tld_material b on a.wllb_code = b.code
@@ -530,6 +532,9 @@
             <if test="askGoodsCode != null and askGoodsCode != ''">
                 and p.ask_goods_code like CONCAT(CONCAT('%', #{askGoodsCode}), '%')
             </if>
+            <if test="wbs != null and wbs != ''">
+                and a.wbs like CONCAT(CONCAT('%', #{wbs}), '%')
+            </if>
             <if test="accountSleeve != null and accountSleeve != ''">
                 and a.account_sleeve = #{accountSleeve}
             </if>
@@ -623,7 +628,7 @@
             join tld_material b on a.material_id = b.tld_id
             join tld_ask_goods_f c on a.ask_goods_id = c.ask_goods_id
             left join tld_department e on c.department = e.code
-            left join tld_company g on b.company_number = g.code
+            left join tld_company g on c.company_number = g.code
         WHERE
 --         (a.num + 0) <![CDATA[>]]> (a.out_num + 0)
           b.part_type = #{partType}
@@ -745,8 +750,8 @@
             b.name as materialName,
             a.num,
             e.user_name as userName,
-            c.name as department,
-            a.wbs,
+            if(c.name = '' , null , c.name ) as department,
+            if(a.wbs = '' , null , a.wbs ) as wbs,
             a.scrq,
             e.real_name as realName,
             f.name as accountName
@@ -879,7 +884,7 @@
         left join tld_material b on a.wllb_code = b.code
         left join tld_user c on a.user_id = c.id
         left join tld_customer e on a.customer_code = e.code
-        left join tld_company f on a.company_number = f.tld_id
+        left join tld_company f on a.company_number = f.code
         left join tld_delivery_f p on a.delivery_id = p.delivery_id
         <trim prefix="WHERE" prefixOverrides="and |or">
             <if test="wllbCode != null and wllbCode != ''">

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

@@ -30,10 +30,10 @@
                 and a.id = #{id}
             </if>
             <if test="type != null and type != ''">
-                and a.type = #{type}
+                and a.type like CONCAT(CONCAT('%', #{type}), '%')
             </if>
             <if test="code != null and code != ''">
-                and a.code = #{code}
+                and a.code like CONCAT(CONCAT('%', #{code}), '%')
             </if>
             <if test="containerName != null and containerName != ''">
                 and a.container_name like CONCAT(CONCAT('%', #{containerName}), '%')
@@ -42,7 +42,7 @@
                 and c.user_name like CONCAT(CONCAT('%', #{modifyUser}), '%')
             </if>
             <if test="department != null and department != ''">
-                and b.name like CONCAT(CONCAT('%', #{department}), '%')
+                and b.code = #{department}
             </if>
         </trim>
         order by a.id desc
@@ -89,8 +89,7 @@
             a.type,
             a.code as code,
             a.container_name,
-            a.num,
-            a.create_time
+            a.num
         from tld_container a
         left join tld_department b on a.department = b.code
         left join tld_user c on a.modify_user = c.id
@@ -101,15 +100,21 @@
             <if test="id != null and id != ''">
                 and a.id = #{id}
             </if>
+            <if test="code != null and code != ''">
+                and a.code like CONCAT(CONCAT('%', #{code}), '%')
+            </if>
             <if test="type != null and type != ''">
-                and a.type = #{type}
+                and a.type like CONCAT(CONCAT('%', #{type}), '%')
             </if>
             <if test="containerName != null and containerName != ''">
-                and a.container_name = #{containerName}
+                and a.container_name like CONCAT(CONCAT('%', #{containerName}), '%')
             </if>
             <if test="modifyUser != null and modifyUser != ''">
                 and c.user_name like CONCAT(CONCAT('%', #{modifyUser}), '%')
             </if>
+            <if test="department != null and department != ''">
+                and b.code = #{department}
+            </if>
         </trim>
         order by a.id desc
     </select>

+ 8 - 8
src/main/resources/mapper/DictionaryMapper.xml

@@ -136,13 +136,13 @@
         select
             a.code,
             a.name,
-            if(a.part_type = '', null , a.part_type),
-            if(a.wllb_class = '', null ,a.wllb_class),
-            if(a.size = '', null , size),
-            if(a.max_num = '', null , a.max_num),
-            if(a.min_num = '', null , a.min_num),
-            if(a.is_not_disable = '1', '是' , '否'),
-            if(a.is_recommend = '1', '是' , '否' )
+            if(a.part_type = '', null , a.part_type) as partType ,
+            if(a.wllb_class = '', null ,a.wllb_class) as wllbClass ,
+            if(a.size = '', null , size) as size,
+            if(a.max_num = '', null , a.max_num) as maxNum,
+            if(a.min_num = '', null , a.min_num) as minNum,
+            if(a.is_not_disable = '1', '是' , '否') as isNotdisable ,
+            if(a.is_recommend = '1', '是' , '否' ) as isRecommend
         from tld_material a
         left join tld_user f on a.modify_user = f.id
         <trim prefix="WHERE" prefixOverrides="and |or">
@@ -171,7 +171,7 @@
                 and a.tld_id = #{tldId}
             </if>
         </trim>
-        order by id desc
+        order by a.id desc
     </select>
     <!-- 查询物料字典内容分页 -->
     <select id="getDictionaryPageMaterial" resultType="com.tld.model.Dictionary">

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

@@ -53,7 +53,7 @@
                 and a.material_id = #{materialId}
             </if>
             <if test="wllbCode != null and wllbCode != ''">
-                and a.wllb_code = #{wllbCode}
+                and a.wllb_code like CONCAT(CONCAT('%', #{wllbCode}), '%')
             </if>
             <if test="uuid != null and uuid != ''">
                 and a.uuid = #{uuid}

+ 11 - 9
src/main/resources/mapper/QueryListMappeer.xml

@@ -84,7 +84,7 @@
             b.storage_location_name as storageLocationName,
             c.code as code,
             c.name as name,
-            c.unit_of_measurement as unitOfMeasurement,
+            m.name as unitOfMeasurement,
             sum( a.amount ) AS sum,
             a.wbs as wbs,
             c.max_num as maxNum,
@@ -96,8 +96,7 @@
             a.account_sleeve as accountSleeve,
             a.supplier_id as supplierId,
             e.name as supplierName,
-            a.storage_location_code as storageLocationCode,
-            m.name as measurementName
+            a.storage_location_code as storageLocationCode
         FROM
         tld_inventory a
         LEFT JOIN tld_storage_location b ON a.storage_location_code = b.storage_location_code
@@ -148,10 +147,6 @@
             </if>
         </trim>
         GROUP BY
-/*      a.storage_location_code,
-        a.material_id,
-        a.wbs,
-        a.account_sleeve*/
         ${groupBy}
     </select>
     <!-- 查询库位信息 -->
@@ -348,12 +343,15 @@
         e.NAME AS materialName,
         e.CODE AS materialCode,
         b.ask_goods_code,
-        b.company_number
+        a.wbs,
+        b.company_number,
+        g.name as companyName
         FROM
         tld_ask_goods a
         JOIN tld_ask_goods_f b ON a.ask_goods_id = b.ask_goods_id
         LEFT JOIN tld_department c ON b.department = c.code
         JOIN tld_material e ON a.material_id = e.tld_id
+        left join tld_company g on b.company_number = g.code
         /*WHERE e.part_type != '半成品' and e.part_type != '产成品'*/
         <trim prefix="WHERE" prefixOverrides="and |or">
             <if test="materialCode != null and materialCode != ''">
@@ -473,12 +471,15 @@
         e.NAME AS materialName,
         e.CODE AS materialCode,
         b.ask_goods_code,
-        b.company_number
+        a.wbs,
+        b.company_number,
+        g.name as companyName
         FROM
         tld_invite a
         JOIN tld_invite_f b ON a.ask_goods_id = b.ask_goods_id
         LEFT JOIN tld_department c ON b.department = c.code
         JOIN tld_material e ON a.material_id = e.tld_id
+        left join tld_company g on b.company_number = g.code
         /*WHERE e.part_type != '半成品' and e.part_type != '产成品'*/
         <trim prefix="WHERE" prefixOverrides="and |or">
             <if test="materialCode != null and materialCode != ''">
@@ -741,6 +742,7 @@
         join tld_material c on a.material_id = c.tld_id
         join tld_warehouse e on a.supply_warehouse_id = e.tld_id
         join tld_warehouse f on b.ask_goods_warehouse_id = f.tld_id
+        join tld_company k on a.account_sleeve = k.code
         <trim prefix="WHERE" prefixOverrides="and |or">
             <if test="type != null and type != ''">
                 and a.type = #{type}

+ 3 - 0
src/main/resources/mapper/ReceiveGoodsMapper.xml

@@ -29,6 +29,9 @@
             <if test="materialId != null and materialId != ''">
                 and a.material_id like CONCAT(CONCAT('%',#{materialId},'%'))
             </if>
+            <if test="materialCode != null and materialCode != ''">
+                and b.code like CONCAT(CONCAT('%',#{materialCode},'%'))
+            </if>
             <if test="supplierId != null and supplierId != ''">
                 and a.supplier_id = #{supplierId}
             </if>

+ 1 - 2
src/main/resources/mapper/RoleMapper.xml

@@ -82,8 +82,7 @@
         select
         a.role_code,
         a.role_name,
-        a.create_time,
-        if(a.remarks = '', null , a.remarks) as remarks,
+        if(a.remarks = '', null , a.remarks) as remarks
         from tld_role a
         left join tld_user b on a.modify_user = b.id
         <trim prefix="WHERE" prefixOverrides="and |or">

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

@@ -103,9 +103,8 @@
         a.storage_location_name,
         b.name,
         if(a.storage_location_type = '', null , a.storage_location_type) as storageLocationType,
-        a.storage_location_capacity,
         if(a.is_not_disable = '1', '是' , '否') as isNotDisable,
-        a.create_time
+        if(a.is_product = '1', '是' , '否') as isProduct
         from tld_storage_location a
         left join tld_warehouse b on a.warehouse_where = b.tld_id
         left join tld_user f on a.modify_user = f.id
@@ -125,6 +124,9 @@
             <if test="isNotDisable != null and isNotDisable != ''">
                 and a.is_not_disable = #{isNotDisable}
             </if>
+            <if test="isProduct != null and isProduct != ''">
+                and a.is_product = #{isProduct}
+            </if>
             <if test="warehouseWhere != null and warehouseWhere != ''">
                 and a.warehouse_where = #{warehouseWhere}
             </if>

+ 0 - 1
src/main/resources/mapper/UserMapper.xml

@@ -140,7 +140,6 @@
         a.user_name,
         if(a.real_name = '', null , a.real_name) as real_name,
         if(a.email = '', null , a.email) as email,
-        if(a.landline = '', null , a.landline) as landline,
         if(a.phone = '', null , a.phone) as phone,
         c.name as department,
         b.role_name as role

+ 4 - 4
src/main/resources/mapper/UserMaterialMapper.xml

@@ -34,7 +34,7 @@
                 and c.user_name like CONCAT(CONCAT('%', #{userName}), '%')
             </if>
             <if test="realName != null and realName != ''">
-                and f.real_name like CONCAT(CONCAT('%', #{realName}), '%')
+                and c.real_name like CONCAT(CONCAT('%', #{realName}), '%')
             </if>
             <if test="modifyUser != null and modifyUser != ''">
                 and f.user_name like CONCAT(CONCAT('%', #{modifyUser}), '%')
@@ -99,7 +99,7 @@
         b.CODE AS wllbCode,
         b.NAME AS materialName,
         c.user_name AS userName,
-        f.real_name AS real_name
+        c.real_name AS real_name
         FROM
         tld_user_material a
         LEFT JOIN tld_material b ON a.material_id = b.CODE
@@ -122,10 +122,10 @@
                 and a.user_id = #{userId}
             </if>
             <if test="realName != null and realName != ''">
-                and f.real_name like CONCAT(CONCAT('%', #{realName}), '%')
+                and c.real_name like CONCAT(CONCAT('%', #{realName}), '%')
             </if>
             <if test="modifyUser != null and modifyUser != ''">
-                and c.user_name like CONCAT(CONCAT('%', #{modifyUser}), '%')
+                and f.user_name like CONCAT(CONCAT('%', #{modifyUser}), '%')
             </if>
             <if test="id != null and id != ''">
                 and a.id = #{id}

+ 14 - 11
src/main/resources/mapper/WarehousingMapper.xml

@@ -57,7 +57,8 @@
     </select>
     <!-- 查询是否是混合物料 -->
     <select id="getIsNotSisable" resultType="String">
-        select is_not_disable
+        select
+            ifnull(is_not_disable,'') as  isNotDisable
         from tld_material
         where code = #{wllbCode}
     </select>
@@ -318,6 +319,7 @@
             c.real_name as realName,
             a.order_code as orderCode,
             f.name as accountName,
+            a.account_sleeve as accountSleeve,
             if(a.purchase_num = '', null, a.purchase_num) as purchaseNum
         from tld_storage a
         left join tld_material b on a.wllb_code = b.code
@@ -639,10 +641,11 @@
             c.user_name,
             a.scrq,
             a.storage_code,
-            a.wbs,
+            if(a.wbs = '' , null ,a.wbs) wbs,
             c.real_name as realName,
-            a.production_code as productionCode,
-            e.name as accountName
+            if(a.production_code = '' , null ,a.production_code)  as productionCode,
+            e.name as accountName,
+            a.account_sleeve as accountSleeve
         from tld_half_product a
         left join tld_material b on a.wllb_code = b.code
         left join tld_user c on a.user_id = c.id
@@ -730,7 +733,7 @@
             size,
             wllb_class,
             is_not_disable,
-            is_recommend,
+            ifnull(is_recommend,'') as isRecommend,
             part_type
         from tld_material
         <trim prefix="WHERE" prefixOverrides="and |or">
@@ -816,7 +819,7 @@
             a.storage_code,
             a.wbs,
             c.real_name as realName,
-            a.production_code as productionCod,
+            a.production_code as productionCode,
             a.account_sleeve as companyNumber,
             f.name as accountName
         from tld_half a
@@ -855,6 +858,9 @@
             <if test="storageLocationName != null and storageLocationName != ''">
                 and e.storage_location_name like CONCAT(CONCAT('%', #{storageLocationName}), '%')
             </if>
+            <if test="productionCode != null and productionCode != ''">
+                and a.production_code like CONCAT(CONCAT('%', #{productionCode}), '%')
+            </if>
             <if test="companyNumber != null and companyNumber != ''">
                 and a.account_sleeve = #{companyNumber}
             </if>
@@ -872,13 +878,13 @@
             a.storage_location_code,
             a.scrq,
             a.serial,
-            if(a.seq = '' , null , a.seq) as seq,
             if(a.attribute = '' , null , a.attribute) as attribute,
             a.storage_code,
             if(a.wbs = '' , null , a.wbs) as wbs,
             c.real_name as realName,
             a.production_code as productionCode,
-            f.name as accountName
+            f.name as accountName,
+            a.account_sleeve as accountSleeve
         from tld_half a
         left join tld_material b on a.wllb_code = b.code
         left join tld_user c on a.user_id = c.id
@@ -917,9 +923,6 @@
             <if test="storageLocationName != null and storageLocationName != ''">
                 and e.storage_location_name like CONCAT(CONCAT('%', #{storageLocationName}), '%')
             </if>
-            <if test="productionCode != null and productionCode != ''">
-                and a.production_code like CONCAT(CONCAT('%', #{productionCode}), '%')
-            </if>
             <if test="companyNumber != null and companyNumber != ''">
                 and a.account_sleeve = #{companyNumber}
             </if>