1 rok pred
rodič
commit
37a8cda1a0

+ 4 - 4
platform-dao/src/main/java/com/platform/dao/vo/export/store/ExportOutStoreDetailVO.java

@@ -90,7 +90,7 @@ public class ExportOutStoreDetailVO implements Serializable {
   private LocalDateTime updateTime;
 
   @Excel(name = "备件类别", orderNum = "13")
-  private String typeId;
+  private String typeName;
 
   @Excel(name = "备件编码", orderNum = "14")
   private String no;
@@ -119,13 +119,13 @@ public class ExportOutStoreDetailVO implements Serializable {
   @Excel(name = "最低库存", orderNum = "22")
   private String minStock;
 
-  @Excel(name = "等级", orderNum = "23")
+  @Excel(name = "等级", orderNum = "23", dicCode = "SPARE_PART_INFO_LEVEL")
   private String level;
 
   @Excel(name = "生产商", orderNum = "24")
-  private String producerId;
+  private String producerName;
 
-  @Excel(name = "用途", orderNum = "25")
+  @Excel(name = "用途", orderNum = "25",dicCode = "SPARE_USE_TYPE")
   private String yt;
 
 

+ 1 - 0
platform-dao/src/main/java/com/platform/dao/vo/query/store/OutStoreFormVO.java

@@ -25,6 +25,7 @@ import java.util.List;
 @Accessors(chain = true)
 @EqualsAndHashCode(callSuper = true)
 public class OutStoreFormVO extends BaseVO implements Serializable {
+    private String producerName;
     private String typeName;
     private String name;
     private String typeId;

+ 8 - 8
platform-dao/src/main/resources/mapper/store/OutStoreFormMapper.xml

@@ -279,16 +279,16 @@
 
     <select id="getOutStoreFormCollect" resultType="com.platform.dao.vo.query.store.OutStoreFormVO"
             parameterType="com.platform.dao.dto.store.OutStoreFormDTO">
-        select info.*,sum(form.out_num ) totalNum,sum(form.out_num )*info.initial_value as totalPrice,form.id outId,form.out_no outNo,store.id storeId,spareStore.spare_id spareId  from t_spare_part_info info
-        right join t_out_store_form form on info.id = form.spare_id
+        select info.*,sum(form.out_num ) totalNum,sum(form.out_num )*info.initial_value as totalPrice,form.id outId,
+        form.out_no outNo,store.id storeId,spareStore.spare_id spareId,
+        spareType.name as typeName,sum(spareStore.num) currentStock,producer.name as producerName
+
+          from t_spare_part_info info
+        inner join t_out_store_form form on info.id = form.spare_id
         left join t_spare_store spareStore on spareStore.spare_id = info.id
         left join t_store store on store.id = spareStore.store_id
-        <if test="producerName != null and producerName != ''">
-            LEFT JOIN t_firm_producer producer on producer.id = info.producer_id
-        </if>
-        <if test="supplierName != null and supplierName != ''">
-            LEFT JOIN t_supplier supplier on supplier.id = info.supplier_id
-        </if>
+        left join t_spare_type spareType on spareType.id = info.type_id
+        left join t_firm_producer producer on producer.id = info.producer_id
         <where>
             <if test="storeId!=null and storeId!=''">
                 store.id = #{storeId}