wuxw před 3 roky
rodič
revize
54ae5a2ea1

+ 4 - 3
java110-db/src/main/resources/mapper/store/ResourceStoreServiceDaoImplMapper.xml

@@ -502,8 +502,9 @@
     </select>
     <!-- 查询资源信息 add by wuxw 2018-07-03 -->
     <select id="queryResourceStoresTotalPrice" parameterType="Map" resultType="Map">
-        select IFNULL(sum(w.stock*w.average_price),0) as totalPrice from(
-        select t.stock,t.average_price from resource_store t
+        select IFNULL(sum(total_price),0) as totalPrice from(
+        select rsts.res_code ,sum(rsts.stock*rsts.price) total_price from resource_store t
+        inner join resource_store_times rsts on t.res_code = rsts.res_code and rsts.status_cd = '0'
         left join resource_store_type rst on t.rst_id = rst.rst_id and rst.status_cd = '0'
         left join resource_store_type rst1 on t.parent_rst_id = rst1.rst_id and rst1.status_cd = '0'
         left join resource_store_specification rss on t.rss_id = rss.rss_id and rss.status_cd = '0'
@@ -608,7 +609,7 @@
         <if test="resOrderType == '20000'">
             and t.stock > 0
         </if>
-        order by t.create_time desc,t.res_id DESC
+        group by rsts.res_code
         <if test="page != -1 and page != null ">
             limit #{page}, #{row}
         </if>

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

@@ -18,8 +18,8 @@
     <!-- 查询物品次数信息 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_code,t.res_code resCode,t.times_id,t.times_id timesId,
-        (t.price * t.stock) totalPrice
+        statusCd,t.store_id,t.store_id storeId,t.stock,t.res_code,t.res_code resCode,t.times_id,
+        t.times_id timesId,t.create_time createTime,(t.price * t.stock) totalPrice
         from resource_store_times t
         where 1 =1
         <if test="price !=null and price != ''">

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

@@ -36,7 +36,7 @@ import java.util.List;
  * 请求地址为/app/purchase/resourceEnter
  */
 
-@Java110CmdDoc(title = "仓库管理员 领用出库",
+@Java110CmdDoc(title = "领用出库",
         description = "主要用于 仓库管理员领用出库",
         httpMethod = "post",
         url = "http://{ip}:{port}/app/collection/resourceOut",
@@ -48,9 +48,9 @@ import java.util.List;
 @Java110ParamsDoc(params = {
         @Java110ParamDoc(name = "applyOrderId", length = 30, remark = "采购申请单订单ID"),
         @Java110ParamDoc(name = "purchaseApplyDetailVo", type = "Array",length = 30, remark = "采购物品信息"),
-        @Java110ParamDoc(parentNodeName = "-", name = "purchaseQuantity", type = "Int",length = 30, remark = "数量"),
-        @Java110ParamDoc(parentNodeName = "-", name = "id", type = "String",length = 30, remark = "采购明细ID"),
-        @Java110ParamDoc(parentNodeName = "-", name = "resId", type = "String",length = 30, remark = "物品ID"),
+        @Java110ParamDoc(parentNodeName = "purchaseApplyDetailVo", name = "purchaseQuantity", type = "Int",length = 30, remark = "数量"),
+        @Java110ParamDoc(parentNodeName = "purchaseApplyDetailVo", name = "id", type = "String",length = 30, remark = "采购明细ID"),
+        @Java110ParamDoc(parentNodeName = "purchaseApplyDetailVo", name = "resId", type = "String",length = 30, remark = "物品ID"),
 })
 
 @Java110ResponseDoc(

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

@@ -36,7 +36,7 @@ import java.util.List;
  * 请求地址为/app/purchase/resourceEnter
  */
 
-@Java110CmdDoc(title = "采购人员入库",
+@Java110CmdDoc(title = "采购入库",
         description = "主要用于 采购人员入库",
         httpMethod = "post",
         url = "http://{ip}:{port}/app/purchase/resourceEnter",
@@ -48,10 +48,10 @@ import java.util.List;
 @Java110ParamsDoc(params = {
         @Java110ParamDoc(name = "applyOrderId", length = 30, remark = "采购申请单订单ID"),
         @Java110ParamDoc(name = "purchaseApplyDetailVo", type = "Array",length = 30, remark = "采购物品信息"),
-        @Java110ParamDoc(parentNodeName = "-", name = "purchaseQuantity", type = "Int",length = 30, remark = "数量"),
-        @Java110ParamDoc(parentNodeName = "-", name = "price", type = "String",length = 30, remark = "价格"),
-        @Java110ParamDoc(parentNodeName = "-", name = "id", type = "String",length = 30, remark = "采购明细ID"),
-        @Java110ParamDoc(parentNodeName = "-", name = "resId", type = "String",length = 30, remark = "物品ID"),
+        @Java110ParamDoc(parentNodeName = "purchaseApplyDetailVo", name = "purchaseQuantity", type = "Int",length = 30, remark = "数量"),
+        @Java110ParamDoc(parentNodeName = "purchaseApplyDetailVo", name = "price", type = "String",length = 30, remark = "价格"),
+        @Java110ParamDoc(parentNodeName = "purchaseApplyDetailVo", name = "id", type = "String",length = 30, remark = "采购明细ID"),
+        @Java110ParamDoc(parentNodeName = "purchaseApplyDetailVo", name = "resId", type = "String",length = 30, remark = "物品ID"),
 })
 
 @Java110ResponseDoc(