Przeglądaj źródła

资金账户报表-->仓单汇总报表修改

xie.kaifeng 1 rok temu
rodzic
commit
c560fe9fff

+ 22 - 34
mtp3-century/src/main/resources/mapper/ReckonDaydividecountdetailMapper.xml

@@ -1187,56 +1187,44 @@
     <select id="wrposition"  parameterType="com.muchinfo.mtp3pojos.vo.reportform.TaAccountReportParam"
             resultType="com.muchinfo.mtp3pojos.vo.reportform.WrPositionResult">
         <choose>
-            <when test="vo.cycletype==0">
+            <when test="cycletype==0">
                 select
-                ras.oriqty "oriqty", ras.curqty "curqty", ras.buyqty "buyqty", ras.sellqty "sellqty", ras.buydeliveryqty
-                "buydeliveryqty",
-                ras.selldeliveryqty "selldeliveryqty", ras.pricedqty "pricedqty", ras.pricedcancelledqty
-                "pricedcancelledqty",
-                ras.pricedrelatedqty "pricedrelatedqty", (nvl(ras.pricedrelatedqty, 0) - nvl(ras.unpricedrelatedqty, 0))
-                "curpricedrelatedqty",
-                ras.closedqty "closedqty", ras.accountid "accountid", gudic.enumdicname as "unitname", ras.wrstandardid
-                "wrstandardid",
-                gd.deliverygoodsname "deliverygoodsname", ws.wrstandardname "wrstandardname", ras.deliverygoodsid
-                "deliverygoodsid"
-                from Reckon_AccountSpot ras
-                left join wrstandard ws on ras.wrstandardid = ws.wrstandardid
-                left join DeliveryGoods gd on ras.deliverygoodsid = gd.deliverygoodsid
-                left join ENUMDICITEM gudic on gudic.enumdiccode = 'goodsunit' and gudic.enumitemname = ws.unitid
+                dwrs.totalqty "totalqty", dwrs.increaseqty "increaseqty", dwrs.decreaseqty "decreaseqty",
+                dwrs.freezeqty "freezeqty", dwrs.deliverygoodsid "deliverygoodsid", dwrs.accountid "accountid",
+                (dwrs.totalqty - dwrs.freezeqty) "usedqty",
+                (dwrs.totalqty - dwrs.increaseqty + dwrs.decreaseqty) "startqty",
+                gd.deliverygoodsname "deliverygoodsname", ws.wrstandardname "wrstandardname"
+                from Reckon_DayWRStandard dwrs
+                left join wrstandard ws on dwrs.wrstandardid = ws.wrstandardid
+                left join DeliveryGoods gd on gd.deliverygoodsid = dwrs.deliverygoodsid
                 <where>
                     <if test="vo.cycletime != null and vo.cycletime !=''">
-                        and ras.reckondate=#{vo.cycletime}
+                        and dwrs.ReckonDate=#{vo.cycletime}
                     </if>
                     <if test="vo.accountid != null">
-                        and ras.accountid=#{vo.accountid}
+                        and dwrs.accountid=#{vo.accountid}
                     </if>
                 </where>
             </when>
             <otherwise>
                 select
-                ras.oriqty "oriqty", ras.curqty "curqty", ras.buyqty "buyqty", ras.sellqty "sellqty", ras.buydeliveryqty
-                "buydeliveryqty",
-                ras.selldeliveryqty "selldeliveryqty", ras.pricedqty "pricedqty", ras.pricedcancelledqty
-                "pricedcancelledqty",
-                ras.pricedrelatedqty "pricedrelatedqty", (nvl(ras.pricedrelatedqty, 0) - nvl(ras.unpricedrelatedqty, 0))
-                "curpricedrelatedqty",
-                ras.closedqty "closedqty", ras.accountid "accountid", gudic.enumdicname as "unitname", ras.wrstandardid
-                "wrstandardid",
-                gd.deliverygoodsname "deliverygoodsname", ws.wrstandardname "wrstandardname", ras.deliverygoodsid
-                "deliverygoodsid"
-                from Report_AccountSpot ras
-                left join wrstandard ws on ras.wrstandardid = ws.wrstandardid
-                left join DeliveryGoods gd on ras.deliverygoodsid = gd.deliverygoodsid
-                left join ENUMDICITEM gudic on gudic.enumdiccode = 'goodsunit' and gudic.enumitemname = ws.unitid
+                dwrs.totalqty "totalqty", dwrs.increaseqty "increaseqty", dwrs.decreaseqty "decreaseqty",
+                dwrs.freezeqty "freezeqty", dwrs.deliverygoodsid "deliverygoodsid", dwrs.accountid "accountid",
+                (dwrs.totalqty - dwrs.freezeqty) "usedqty",
+                (dwrs.totalqty - dwrs.increaseqty + dwrs.decreaseqty) "startqty",
+                gd.deliverygoodsname "deliverygoodsname", ws.wrstandardname "wrstandardname"
+                from report_daywrstandard dwrs
+                left join wrstandard ws on dwrs.wrstandardid = ws.wrstandardid
+                left join DeliveryGoods gd on gd.deliverygoodsid = dwrs.deliverygoodsid
                 <where>
                     <if test="vo.cycletime != null and vo.cycletime !=''">
-                        and ras.cycletime=#{vo.cycletime}
+                        and dwrs.cycletime=#{vo.cycletime}
                     </if>
                     <if test="vo.cycletype !=null and vo.cycletype != ''">
-                        and ras.cycletype=#{vo.cycletype}
+                        and dwrs.cycletype=#{vo.cycletype}
                     </if>
                     <if test="vo.accountid != null">
-                        and ras.accountid=#{vo.accountid}
+                        and dwrs.accountid=#{vo.accountid}
                     </if>
                 </where>
             </otherwise>

+ 8 - 9
mtp3-pojos/src/main/java/com/muchinfo/mtp3pojos/vo/reportform/WrPositionResult.java

@@ -21,21 +21,20 @@ public class WrPositionResult {
     private String wrstandardname;
 
     @ApiModelProperty(value = "期初数量")
-    private Integer oriqty;
+    private Integer startqty;
 
     @ApiModelProperty(value = "期末数量")
-    private Integer curqty;
+    private Integer totalqty;
 
-    @ApiModelProperty(value = "可用数量 oriqty - freezeqty")
-    @Builder.Default
-    private Integer usedqty = 0;
+    @ApiModelProperty(value = "可用数量")
+    private Integer usedqty;
 
-    @ApiModelProperty(value = "冻结数量 字段未确定")
-    private Integer freezeqty = 0;
+    @ApiModelProperty(value = "冻结数量")
+    private Integer freezeqty;
 
     @ApiModelProperty(value = "采购数量")
-    private Integer buydeliveryqty;
+    private Integer increaseqty;
 
     @ApiModelProperty(value = "销售数量")
-    private Integer selldeliveryqty;
+    private Integer decreaseqty;
 }