wuxw 3 vuotta sitten
vanhempi
commit
cb36f7c8cf

+ 5 - 5
java110-bean/src/main/java/com/java110/dto/resourceStoreTimes/ResourceStoreTimesDto.java

@@ -21,7 +21,7 @@ public class ResourceStoreTimesDto extends PageDto implements Serializable {
     private String stock;
 
     private String hasStock;
-    private String resId;
+    private String resCode;
     private String timesId;
 
 
@@ -62,12 +62,12 @@ public class ResourceStoreTimesDto extends PageDto implements Serializable {
         this.stock = stock;
     }
 
-    public String getResId() {
-        return resId;
+    public String getResCode() {
+        return resCode;
     }
 
-    public void setResId(String resId) {
-        this.resId = resId;
+    public void setResCode(String resCode) {
+        this.resCode = resCode;
     }
 
     public String getTimesId() {

+ 5 - 5
java110-bean/src/main/java/com/java110/po/resourceStoreTimes/ResourceStoreTimesPo.java

@@ -33,7 +33,7 @@ public class ResourceStoreTimesPo implements Serializable {
     private String statusCd = "0";
     private String storeId;
     private String stock;
-    private String resId;
+    private String resCode;
     private String timesId;
 
     public String getPrice() {
@@ -76,12 +76,12 @@ public class ResourceStoreTimesPo implements Serializable {
         this.stock = stock;
     }
 
-    public String getResId() {
-        return resId;
+    public String getResCode() {
+        return resCode;
     }
 
-    public void setResId(String resId) {
-        this.resId = resId;
+    public void setResCode(String resCode) {
+        this.resCode = resCode;
     }
 
     public String getTimesId() {

+ 9 - 9
java110-db/src/main/resources/mapper/store/ResourceStoreTimesV1ServiceDaoImplMapper.xml

@@ -8,9 +8,9 @@
     <!-- 保存物品次数信息 add by wuxw 2018-07-03 -->
     <insert id="saveResourceStoreTimesInfo" parameterType="Map">
         insert into resource_store_times(
-        price,apply_order_id,store_id,stock,res_id,times_id
+        price,apply_order_id,store_id,stock,res_code,times_id
         ) values (
-        #{price},#{applyOrderId},#{storeId},#{stock},#{resId},#{timesId}
+        #{price},#{applyOrderId},#{storeId},#{stock},#{resCode},#{timesId}
         )
     </insert>
 
@@ -18,7 +18,7 @@
     <!-- 查询物品次数信息 add by wuxw 2018-07-03 -->
     <select id="getResourceStoreTimesInfo" parameterType="Map" resultType="Map">
         select t.price,t.apply_order_id,t.apply_order_id applyOrderId,t.status_cd,t.status_cd
-        statusCd,t.store_id,t.store_id storeId,t.stock,t.res_id,t.res_id resId,t.times_id,t.times_id timesId
+        statusCd,t.store_id,t.store_id storeId,t.stock,t.res_code,t.res_code resCode,t.times_id,t.times_id timesId
         from resource_store_times t
         where 1 =1
         <if test="price !=null and price != ''">
@@ -39,8 +39,8 @@
         <if test="hasStock !=null and hasStock != ''">
             and t.stock > 0
         </if>
-        <if test="resId !=null and resId != ''">
-            and t.res_id= #{resId}
+        <if test="resCode !=null and resCode != ''">
+            and t.res_code= #{resCode}
         </if>
         <if test="timesId !=null and timesId != ''">
             and t.times_id= #{timesId}
@@ -71,8 +71,8 @@
         <if test="stock !=null and stock != ''">
             , t.stock= #{stock}
         </if>
-        <if test="resId !=null and resId != ''">
-            , t.res_id= #{resId}
+        <if test="resCode !=null and resCode != ''">
+            , t.res_code= #{resCode}
         </if>
         where 1=1
         <if test="timesId !=null and timesId != ''">
@@ -104,8 +104,8 @@
         <if test="hasStock !=null and hasStock != ''">
             and t.stock > 0
         </if>
-        <if test="resId !=null and resId != ''">
-            and t.res_id= #{resId}
+        <if test="resCode !=null and resCode != ''">
+            and t.res_code= #{resCode}
         </if>
         <if test="timesId !=null and timesId != ''">
             and t.times_id= #{timesId}

+ 4 - 4
service-store/src/main/java/com/java110/store/cmd/collection/ResourceOutCmd.java

@@ -151,7 +151,7 @@ public class ResourceOutCmd extends Cmd {
             resourceStoreInnerServiceSMOImpl.updateResourceStore(resourceStorePo);
 
             //加入 从库存中扣减
-            subResourceStoreTimesStock(purchaseApplyDetailPo.getResId(), purchaseApplyDetailPo.getPurchaseQuantity());
+            subResourceStoreTimesStock(resourceStores.get(0).getResCode(), purchaseApplyDetailPo.getPurchaseQuantity());
 
             ResourceStoreDto resourceStoreDto = new ResourceStoreDto();
             resourceStoreDto.setResId(purchaseApplyDetailPo.getResId());
@@ -233,13 +233,13 @@ public class ResourceOutCmd extends Cmd {
 
     /**
      * 从times中扣减
-     * @param resId
+     * @param resCode
      * @param applyQuantity
      */
-    private void subResourceStoreTimesStock(String resId, String applyQuantity) {
+    private void subResourceStoreTimesStock(String resCode, String applyQuantity) {
 
         ResourceStoreTimesDto resourceStoreTimesDto = new ResourceStoreTimesDto();
-        resourceStoreTimesDto.setResId(resId);
+        resourceStoreTimesDto.setResCode(resCode);
         resourceStoreTimesDto.setHasStock("Y");
         List<ResourceStoreTimesDto> resourceStoreTimesDtos = resourceStoreTimesV1InnerServiceSMOImpl.queryResourceStoreTimess(resourceStoreTimesDto);
 

+ 1 - 1
service-store/src/main/java/com/java110/store/cmd/purchase/ResourceEnterCmd.java

@@ -153,7 +153,7 @@ public class ResourceEnterCmd extends Cmd{
             resourceStoreTimesPo.setApplyOrderId(purchaseApplyPo.getApplyOrderId());
             resourceStoreTimesPo.setPrice(purchaseApplyDetailPo.getPrice());
             resourceStoreTimesPo.setStock(purchaseApplyDetailPo.getPurchaseQuantity());
-            resourceStoreTimesPo.setResId(purchaseApplyDetailPo.getResId());
+            resourceStoreTimesPo.setResCode(resourceStoreDtos.get(0).getResCode());
             resourceStoreTimesPo.setStoreId(resourceStoreDtos.get(0).getStoreId());
             resourceStoreTimesPo.setTimesId(GenerateCodeFactory.getGeneratorId("10"));
             resourceStoreTimesV1InnerServiceSMOImpl.saveResourceStoreTimes(resourceStoreTimesPo);

+ 1 - 0
service-store/src/main/java/com/java110/store/cmd/resourceStore/AuditAllocationStoreOrderCmd.java

@@ -14,6 +14,7 @@ import com.java110.intf.common.IAllocationStorehouseUserInnerServiceSMO;
 import com.java110.intf.store.*;
 import com.java110.po.allocationStorehouseApply.AllocationStorehouseApplyPo;
 import com.java110.po.purchase.ResourceStorePo;
+import com.java110.po.resourceStoreTimes.ResourceStoreTimesPo;
 import com.java110.utils.exception.CmdException;
 import com.java110.utils.util.Assert;
 import com.java110.utils.util.BeanConvertUtil;