Browse Source

优化出库和退库

hfxc226 2 years ago
parent
commit
5ec028b6fd

+ 5 - 1
platform-dao/src/main/java/com/platform/dao/dto/store/OutStoreDetailDTO.java

@@ -74,6 +74,10 @@ public class OutStoreDetailDTO extends BaseDTO implements Serializable {
      * 出库数量
      */
     private BigDecimal num;
+    /**
+     * 出库数量
+     */
+    private BigDecimal storeNum;
     /**
      * 价格
      */
@@ -148,7 +152,7 @@ public class OutStoreDetailDTO extends BaseDTO implements Serializable {
     /**
      * 是否出库:0退库,1出库
      */
-    private Integer isOut;
+    private Integer outFlag;
     /**
      * 打印新增字段
      */

+ 1 - 1
platform-dao/src/main/java/com/platform/dao/dto/store/OutStoreFormDTO.java

@@ -157,5 +157,5 @@ public class OutStoreFormDTO extends BaseDTO implements Serializable {
     /**
      * 是否出库:0退库,1出库
      */
-    private Integer isOut;
+    private Integer outFlag;
 }

+ 19 - 9
platform-dao/src/main/java/com/platform/dao/entity/store/OutStoreDetail.java

@@ -8,8 +8,10 @@ import java.io.Serializable;
 import java.math.BigDecimal;
 import java.time.LocalDateTime;
 import java.time.LocalDate;
+
 import lombok.experimental.Accessors;
 import com.platform.common.bean.DataScope;
+
 import javax.persistence.Transient;
 
 /**
@@ -21,13 +23,13 @@ import javax.persistence.Transient;
 @Data
 @Accessors(chain = true)
 @Table(name = "t_out_store_detail")
-public class OutStoreDetail implements Serializable{
+public class OutStoreDetail implements Serializable {
 
     private Integer autoId;
     /**
      * 主键
      */
-        @Id
+    @Id
     private String id;
     /**
      * 出库单id
@@ -53,6 +55,10 @@ public class OutStoreDetail implements Serializable{
      * 出库数量
      */
     private BigDecimal num;
+    /**
+     * 出库数量
+     */
+    private BigDecimal storeNum;
     /**
      * 价格
      */
@@ -86,17 +92,21 @@ public class OutStoreDetail implements Serializable{
      */
     private LocalDateTime updateTime;
 
-   /**
-    * 数据权限
-    */
+    /**
+     * 数据权限
+     */
     @Transient
     private DataScope dataScope;
 
 
-    private String yyId; ;// 用友单号id
-    private String spareName; ;// 备件名称
-    private String storeName; ;// 仓库名称
-    private BigDecimal realNum; ;// 实际数量
+    private String yyId;
+    ;// 用友单号id
+    private String spareName;
+    ;// 备件名称
+    private String storeName;
+    ;// 仓库名称
+    private BigDecimal realNum;
+    ;// 实际数量
     private String no; // 备件编号
     private String ggxh; // 备件规格型号
     private String cBatch; // 批次

+ 1 - 1
platform-dao/src/main/java/com/platform/dao/entity/store/OutStoreForm.java

@@ -110,5 +110,5 @@ public class OutStoreForm implements Serializable{
     /**
      * 是否出库:0退库,1出库
      */
-    private Integer isOut;
+    private Integer outFlag;
 }

+ 4 - 0
platform-dao/src/main/java/com/platform/dao/vo/query/store/OutStoreDetailVO.java

@@ -63,6 +63,10 @@ public class OutStoreDetailVO extends BaseVO implements Serializable {
      * 数量
      */
     private BigDecimal num;
+    /**
+     * 出库数量
+     */
+    private BigDecimal storeNum;
     /**
      * 价格
      */

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

@@ -119,5 +119,5 @@ public class OutStoreFormVO extends BaseVO implements Serializable {
     /**
      * 是否出库:0退库,1出库
      */
-    private Integer isOut;
+    private Integer outFlag;
 }

+ 2 - 0
platform-dao/src/main/resources/mapper/store/OutStoreDetailMapper.xml

@@ -10,6 +10,7 @@
                                      outstoredetail.no,
                                      outstoredetail.ggxh,
                                      outstoredetail.real_num,
+                                     outstoredetail.store_num,
                                      outstoredetail.yy_id,outstoredetail.auto_id,
                                      outstoredetail.is_out,
 outstoredetail.c_batch,
@@ -36,6 +37,7 @@ outstoredetail.c_batch,
                                      outstoredetail.spare_id,
 outstoredetail.c_batch,
                                      outstoredetail.real_num,
+                                     outstoredetail.store_num,
                                      outstoredetail.yy_id,outstoredetail.auto_id,
                                      outstoredetail.is_out,
                                      outstoredetail.store_name,

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

@@ -13,7 +13,7 @@ outstoreform.apply_user,outstoreform.apply_user_name,
                                      outstoreform.pick_no,
 outstoreform.process_instance_id,
                                      outstoreform.remark,
-                                     outstoreform.is_out,
+                                     outstoreform.out_flag,
                                      outstoreform.created_user_id,
                                      outstoreform.created_user_name,
                                      outstoreform.update_user_id,
@@ -37,7 +37,7 @@ outstoreform.apply_user,outstoreform.apply_user_name,
                                      outstoreform.pick_id,
                                      outstoreform.pick_no,
                                      outstoreform.user_time,
-                                     outstoreform.is_out,
+                                     outstoreform.out_flag,
                                      outstoreform.store_name,
 outstoreform.process_instance_id,
                                      outstoreform.remark
@@ -67,8 +67,8 @@ outstoreform.process_instance_id,
         <if test="processInstanceId != null">
             and outstoreform.process_instance_id = #{processInstanceId}
         </if>
-        <if test="isOut != null">
-            and outstoreform.is_out = #{isOut}
+        <if test="outFlag != null">
+            and outstoreform.out_flag = #{outFlag}
         </if>
         <if test="pickNo != null and pickNo != ''">
             and outstoreform.pick_no = #{pickNo}

+ 3 - 3
platform-service/src/main/java/com/platform/service/store/impl/OutStoreFormServiceImpl.java

@@ -254,7 +254,7 @@ public class OutStoreFormServiceImpl extends BaseServiceImpl<OutStoreFormMapper,
             detail.setOutId(outStoreForm.getId());
             detail.setRealNum(detail.getNum());
             detail.setOutNo(outStoreForm.getOutNo());
-            detail.setIsOut(outStoreForm.getIsOut());
+            detail.setOutFlag(outStoreForm.getOutFlag());
             OutStoreDetail storeDetail = new OutStoreDetail();
             BeanConverterUtil.copyObjectProperties(detail, storeDetail);
             storeDetail.setId(IdGeneratorUtils.getObjectId());
@@ -479,7 +479,7 @@ public class OutStoreFormServiceImpl extends BaseServiceImpl<OutStoreFormMapper,
                 }
                 //detail.setStoreId(model.getStoreId());
                 detail.setOutNo(model.getOutNo());
-                detail.setIsOut(model.getIsOut());
+                detail.setOutFlag(model.getOutFlag());
                 detail.setRealNum(detail.getNum());
                 OutStoreDetail storeDetail = new OutStoreDetail();
                 BeanConverterUtil.copyObjectProperties(detail, storeDetail);
@@ -487,7 +487,7 @@ public class OutStoreFormServiceImpl extends BaseServiceImpl<OutStoreFormMapper,
                 addDetailList.add(storeDetail);
             } else {// 修改数量的
                 detail.setTotalPrice(new BigDecimal(0));
-                detail.setIsOut(model.getIsOut());
+                detail.setOutFlag(model.getOutFlag());
                 detail.setRealNum(detail.getNum());
                 totalPrice = totalPrice.add(detail.getTotalPrice());
                 OutStoreDetail storeDetail = new OutStoreDetail();